/* ==========================================================================
    IMPORTS & VARIABLES
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'Neotrax';
    src: url('./fonts/Neotrax.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #F0EAFC;   /* Fond principal */
    --secondary-color: #0a0619; /* Tons foncés */
    --accent-color: #9e00ff;    /* Accent */
    --text-color: #222;

    /* Variables pour tags (HTML, CSS, JS...) */
    --html-color: #E34C26;
    --css-color: #1572B6;
    --js-color: #F7DF1E;
    --php-color: #8993BE;
    --mysql-color: #4479A1;
    --react-color: #61DAFB;
    --vite-color: #646CFF;
    --figma-color: #F24E1E;
    --no-code-color: #ccc;
}

/* === RESET =============================================================== */

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

/* === STYLES DE BASE ====================================================== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* === TYPOGRAPHIE DES TITRES ============================================== */
h1 {
    font-family: Neotrax, sans-serif;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 4rem;
}

h2 {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 2rem;
}

/* === LIENS ET IMAGES ================================================= */
a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}


/* ==== HEADER & NAVIGATION ==== */

.header {
    width: 100vw;
    padding: 0.7em 1em;
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 100;
}

.header .logo {
    font-family: 'Neotrax', sans-serif;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    width: 100vw;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
    z-index: 110;
    gap: 1.2rem;
    padding: 1.5rem 0;
    list-style: none;
}

.navbar.open {
    display: flex;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    align-items: center;
    justify-content: center;
    z-index: 120;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: 300ms;
}

.navlink {
    padding: 0;
    text-decoration: none;
    color: var(--text-color);
    opacity: 50%;
    font-size: 1rem;
    font-weight: 500;
    display: inline-block;
    border-left: 2px solid transparent;
    transition: 200ms ease;
}


.navlink:hover {
    color: var(--text-color);
    opacity: 100%;
    border-left: 2px solid var(--secondary-color);
    padding-left: 0.5rem;
    transition: opacity 250ms ease-in-out;
}

/* ==== FOOTER ==== */
.footer {
    width: 100vw;
    padding: 1em 1.5em;
    background-color: #fff;
    border-top: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer .logo {
    font-family: 'Neotrax', sans-serif;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.footer-socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--text-color);
    opacity: 60%;
}

.socials-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.socials-list li {
    display: flex;
    margin: 0;
    padding: 0;
}

.social-link {
    display: inline-block;
    transition: transform 200ms ease-in-out;
}

.social-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.social-link:hover {
    transform: scale(1.1);
    transition: transform 200ms ease-in-out;
}

/* === TITRES DE SECTIONS ================================================== */
.section-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    display: flex;
    align-self: flex-start;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 2rem;
}


/* === SECTION HERO ================================================== */
#hero-section {
    width: 100vw;
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2.5em;
}

#hero-section .logo {
    font-size: 2em;
}

#hero-section .tagline {
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: 500;
}

/* === SECTION À PROPOS ================================================== */
#about-section {
    width: 100vw;
    height: fit-content;
    padding: 2.5rem 2.5em;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-text {
    max-width: 800px;
    text-align: left;
}

/* === SECTION PROJETS ================================================== */

#projects-section {
    width: 100vw;
    height: fit-content;
    padding: 2.5rem 2.5em;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

.projects-content {
    width: 100%;
    height: fit-content;
    display: flex;
    align-items: flex-start;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 1.2rem;
}

.card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 200ms ease-in-out;
    touch-action: manipulation;
}

.card-thumbnail {
    width: 100%;
    height: auto;
    object-fit: cover;
    border: var(--secondary-color) 1px solid;
    border-radius:  4px;
}

.card-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
}

.project-description {
    font-size: 0.75em;
    color: var(--text-color);
}

.card-status-btn {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}

.tags ul {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

.tags li {
    padding: 0 0.5rem;
    border-radius: 4px;
}

.html-tag {
    background-color: var(--html-color);
    color: #fff;
}

.css-tag {
    background-color: var(--css-color);
    color: #fff;
}

.js-tag {
    background-color: var(--js-color);
    color: #000;
}

.figma-tag {
    background-color: var(--figma-color);
    color: #fff;
}

.no-code-tag, .super-so-tag {
    background-color: var(--no-code-color);
    color: #000
}

.card-action {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1em;
    padding: 0.5rem 1rem;
    background-color: #fff;
    text-align: center;
    border: 2px solid var(--secondary-color);
    border-radius: 4px;
}

.card-action:hover {
    background-color: var(--accent-color);
    transition: background-color 200ms ease, color 200ms ease;
    cursor: pointer;
}

.card-action:active {
    background-color: var(--secondary-color);
    color: #fff;
    transform: scale(0.98);
    transition: transform 200ms ease, background-color 200ms ease,
        color 200ms ease;
}

/* === SECTION SKILLS ================================================== */

#skills-section {
    width: 100vw;
    height: fit-content;
    padding: 2.5rem 2.5em;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

.skills-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skills-grid {
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    list-style: none;
}

.skills-item {
    display: flex;
    padding: 0.5rem;
    background-color: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    gap: 1rem;
}

.skill-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0.5rem;
}

.skill-label {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    display: flex;
    width: 100%;
    justify-content: center;
    color: var(--text-color);
    text-transform: uppercase;
    font-size: 1rem;
}

/* ==== CONTACT SECTION ==== */

#contact-section {
    width: 100vw;
    height: fit-content;
    padding: 2.5rem 2.5em;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

.contact-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-text {
    font-size: 1.2em;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1rem;
}

.contact-methods a {
  color: var(--accent-color);
  text-decoration: underline;
}

.contact-methods a:hover {
  color: var(--secondary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
}

.contact-label {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.contact-input {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.contact-textarea {
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.contact-button {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary-color);
    background-color: var(--accent-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.contact-button:hover {
    background-color: var(--secondary-color);
    color: #fff;
    transition: background-color 200ms ease;
}

.contact-button:active {
    transform: scale(0.90);
    transition: transform 200ms ease;
}

/* ==== RESPONSIVE STYLES ==== */

@media (min-width: 768px) {
    body {
        font-size: 18px;
    }

    .main-nav .navbar {
        gap: 2rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .contact-content {
        align-items: center;
        margin-bottom: 2rem;
    }

    .contact-text {
        align-self: start;
        text-align: left;
    }
}

@media (min-width: 900px) {
    body {
        font-size: 1.5rem;
    }

    .header {
        padding: 1em 4em;
        align-items: center;
    }

    .header .logo {
        font-size: 1.5rem;
    }

    .navbar {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        box-shadow: none;
        gap: 3em;
        padding: 0;
    }

    .navlink {
        display: flex;
        align-items: center;
    }

    .hamburger {
        display: none;
    }

    .main {
        padding-top: 70px;
    }

    #hero-section {
        min-height: 100vh;
        padding: 0;
    }

    #hero-section .logo {
        font-size: 4rem;
    }

    #hero-section .tagline {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2.5rem;
    }

    .skill-label {
        font-size: 1.5rem;
    }

    #contact-section {
        height: 100%;
    }

    .contact-content {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        align-content: center;
        gap: 4rem;
    }

    .footer {
        flex-direction: row;
    }

    .footer-links {
        flex-direction: row;
        gap: 2rem;
    }

    .footer .navbar {
        font-size: 1rem;
        gap: 1rem;
    }

    .footer-socials {
        flex-direction: row;
        gap: 2rem;
    }
}