/* ================= VARIABLES ================= */
:root {
    --primary: #2563eb;
    --primary-dark: #850a14;
    --background: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --header: rgba(248, 250, 252, 0.9);
    --transition: 0.3s ease;
}


/* ================= DARK MODE ================= */

body.dark {
    --background: #020617;
    --card: #0f172a;
    --text: #f8fafc;
    --text-light: #94a3b8;
    --border: #1e293b;
    --header: rgba(2, 6, 23, 0.9);
}


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

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button,
input,
textarea {
    font-family: inherit;
}


/* ================= CONTAINER ================= */

.container {
    width: 90%;
    max-width: 1150px;
    margin: auto;
}


/* ================= NAVBAR ================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--header);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.navbar {
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 28px;
    font-weight: 800;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-btn,
.menu-btn {
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.theme-btn:hover,
.menu-btn:hover {
    background: var(--primary);
    color: white;
}

.menu-btn {
    display: none;
}


/* ================= HERO ================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 75px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.small-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: clamp(50px, 7vw, 85px);
    line-height: 1;
}

.hero h1 span {
    color: var(--primary);
}

.hero h2 {
    font-size: 32px;
    margin-top: 20px;
    color: var(--text-light);
}

.hero-description {
    max-width: 550px;
    margin-top: 20px;
    color: var(--text-light);
    font-size: 18px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 35px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.secondary-btn {
    border-color: var(--border);
    background: var(--card);
    color: var(--text);
}

.secondary-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
}


/* ================= CODE WINDOW ================= */

.code-window {
    background: #111827;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    transform: rotate(2deg);
    transition: var(--transition);
}

.code-window:hover {
    transform: rotate(0deg) translateY(-5px);
}

.window-header {
    height: 45px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    background: #1f2937;
}

.window-header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #64748b;
}

.code-content {
    padding: 30px;
    color: #e2e8f0;
    font-family: monospace;
    font-size: 15px;
    line-height: 2;
}

.code-content .purple {
    color: #c084fc;
}

.code-content .green {
    color: #86efac;
}

.indent {
    padding-left: 30px;
}


/* ================= SECTIONS ================= */

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title p {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

.section-title h2 {
    font-size: 40px;
    margin-top: 8px;
}

.section-title h2 span {
    color: var(--primary);
}


/* ================= ABOUT ================= */

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 70px;
    align-items: center;
}


/* PHOTO RONDE */

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

.about-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    border: 5px solid var(--primary);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}


/* ANCIEN EMPLACEMENT PHOTO */

.profile-placeholder {
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: 50%;
    color: var(--primary);
    font-size: 80px;
}

.about-text h3 {
    font-size: 30px;
    margin-bottom: 20px;
}

.about-text h3 span {
    color: var(--primary);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.about-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.about-info div {
    padding: 15px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.about-info strong {
    display: block;
    font-size: 13px;
    color: var(--primary);
}

.about-info span {
    color: var(--text-light);
}


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

.skills-section {
    background: var(--card);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skill-card {
    padding: 35px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

.skill-icon {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 35px;
    margin-bottom: 20px;
}

.html-icon {
    background: #fee2e2;
    color: #ef4444;
}

.css-icon {
    background: #dbeafe;
    color: #2563eb;
}

.js-icon {
    background: #fef3c7;
    color: #eab308;
}

.skill-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.skill-card p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.skill-bar {
    height: 7px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.skill-progress {
    width: 0;
    height: 100%;
    background: var(--primary);
    transition: width 1.5s ease;
}

.skill-percent {
    display: block;
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-light);
}


/* ================= PROJECTS ================= */

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

.project-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 65px;
    color: white;
}

.project-one {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.project-two {
    background: linear-gradient(135deg, #ec4899, #f97316);
}

.project-three {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
}

.project-content {
    padding: 25px;
}

.project-number {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.project-content h3 {
    margin: 8px 0;
    font-size: 22px;
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.technologies span {
    padding: 5px 10px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 12px;
    color: var(--text-light);
}

.project-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 25px;
}

.project-btn {
    color: var(--primary);
    font-weight: 700;
}

.github-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--background);
    border: 1px solid var(--border);
}


/* ================= SERVICES ================= */

.services-section {
    background: var(--card);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.service-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 28px;
}

.service-card h3 {
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-light);
}


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

.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 60px;
}

.contact-info h3 {
    font-size: 32px;
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 35px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary);
    color: white;
}

.contact-item strong {
    display: block;
}

.contact-item span {
    color: var(--text-light);
    font-size: 14px;
}

.contact-form {
    padding: 30px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    background: var(--background);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    resize: vertical;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.error {
    display: block;
    color: #ef4444;
    margin-top: 5px;
    font-size: 12px;
}

.form-message {
    margin-top: 15px;
    font-weight: 600;
}


/* ================= FOOTER ================= */

.footer {
    padding-top: 50px;
    background: #020617;
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
}

.footer p {
    color: #94a3b8;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #334155;
    border-radius: 50%;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--primary);
}

.copyright {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #1e293b;
}


/* ================= RETOUR EN HAUT ================= */

.back-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 500;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}


/* ================= ANIMATIONS ================= */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


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

@media (max-width: 900px) {

    .nav-links {
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        padding: 25px;
        background: var(--card);
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .hero-content,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 120px;
    }

    .hero-card {
        max-width: 650px;
        width: 100%;
        margin: auto;
    }

    .skills-grid,
    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* ================= MOBILE ================= */

@media (max-width: 600px) {

    .container {
        width: 92%;
    }

    .section {
        padding: 75px 0;
    }

    .hero h1 {
        font-size: 55px;
    }

    .hero h2 {
        font-size: 25px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .about-info {
        grid-template-columns: 1fr;
    }

    .about-image img {
        width: 250px;
        height: 250px;
    }

    .profile-placeholder {
        width: 250px;
        height: 250px;
    }

    .skills-grid,
    .projects-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 32px;
    }

    .footer-content {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
}
