@font-face {
    font-family: 'Nexa';
    src: url('fonts/Nexa-Heavy.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'OverusedGrotesk';
    src: url('fonts/OverusedGrotesk-Medium.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

p {
    text-wrap: pretty !important;
}

a.footerBtn {
    color: #ff7980;
    transition: all .3s;
}

a.footerBtn:hover {
    color: #ff414a;
}

:root {
    --bg: #F7FBFB;
    --accent-1: #FFB6B9;
    /* Rouge pastel principal */
    --accent-2: #FFB6B9;
    /* Même couleur pour garder une palette unifiée */
    --text: #1F2937;
    --muted: #6B7280;
    --max-width: 1150px;
    --radius: 14px;
    --glass: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 6px 18px rgba(31, 41, 55, 0.06);
    --font-title: 'Nexa', sans-serif;
    --font-text: 'OverusedGrotesk', sans-serif;
}

/* Base */
* {
    box-sizing: border-box
}

html {
    height: 100%;
    background: linear-gradient(180deg, var(--bg), #ffffff);
    background-attachment: fixed;
    /* le gradient reste sur toute la page */
}


body {
    min-height: 100%;
    background: transparent;
    /* on laisse le fond du html visible */
}

body {
    margin: 0;
    font-family: var(--font-text);
    background: linear-gradient(180deg, var(--bg), #ffffff);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    z-index: 60;
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.logo img {
    height: 40px
}

/* Nav */
.nav {
    display: flex;
    gap: 18px;
    align-items: center
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 10px;
    transition: all .18s
}

.nav-link:hover {
    background: var(--accent-1);
    color: black;
    font-weight: bold;
}

/* Controls */
.controls {
    display: flex;
    align-items: center;
    gap: 12px
}

.lang-select {
    border: 1px solid rgba(15, 23, 42, 0.06);
    padding: 6px;
    border-radius: 8px;
    background: white
}

/* Hamburger (mobile) */
.hamburger {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 4px 0;
    border-radius: 2px
}

/* Sections */
.section {
    padding: 90px 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .6s ease, var(--transform, transform) .6s ease
}

body.loaded .section {
    opacity: 1;
    transform: none
}

/* HERO */
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: center;
    padding-top: 30px;
    padding-bottom: 30px
}

.hero-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 14px;
    font-weight: 700
}

.hero-sub {
    color: var(--muted);
    margin: 0 0 18px
}

.hero-ctas {
    display: flex;
    gap: 12px;
    margin-bottom: 16px
}

/* HERO highlight background - style "crayon" réaliste */
.highlight-bg {
    background: transparent;
    background-image: linear-gradient(to right,
            rgba(255, 182, 185, 0.1),
            /* gauche transparent */
            rgba(255, 182, 185, 0.7) 10%,
            /* début surlignage solide */
            rgba(255, 182, 185, 0.7) 90%,
            /* fin surlignage solide */
            rgba(255, 182, 185, 0.1)
            /* droite transparent */
        );
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding: 0.1em 0.4em;
    border-radius: 0.8em 0.3em;
    font-weight: 700;
    line-height: 1.2;
    font-family: var(--font-title);
    display: inline;
}


.highlight-bg::before {
    left: -2px;
}

.highlight-bg::after {
    right: -2px;
}

/* HERO subtitle rouge pastel */
.hero-sub {
    color: #ff7980;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    margin: 10px 0 16px;
    font-weight: 600;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600
}

.btn-primary {
    background: var(--accent-2);
    color: #1a1a1a;
    box-shadow: 0 6px 18px rgba(255, 182, 185, 0.12);
    transition: all .18s;
}

.btn-primary:hover {
    background: #FFA0A4;
    /* légèrement plus foncé au hover */
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 160, 164, 0.22);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(31, 41, 55, 0.06);
    color: var(--text);
    transition: all .25s;
}

.btn-outline:hover {
    background: rgba(255, 182, 185, 0.1);
    border-color: var(--accent-1);
    color: #1a1a1a;
    font-weight: bold
}

.btn-sm {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.9rem
}

.btn.big {
    padding: 14px 28px;
    border-radius: 16px
}

/* tech badges */
.tech-badges {
    display: flex;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap
}

.tech-badges li {
    background: rgba(255, 182, 185, 0.15);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 600
}

.tech-badges li:hover {
    background: rgba(255, 182, 185, 0.314);
    color: #1a1a1a
}

/* Avatar */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative
}

.avatar-frame {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: #fff4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow)
}

.avatar-frame img.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid var(--accent-1);
}

/* about */
#about {
    margin-bottom: 100px;
    margin-top: -50px;
}

.about-title {
    text-align: center;
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 60px;
    font-family: 'Nexa-Heavy', sans-serif;
}

.projects-title {
    text-align: center;
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 60px;
    font-family: 'Nexa-Heavy', sans-serif;
}

.about-grid {
    display: flex;
    gap: 40px;
    max-width: 80%;
    justify-self: center;
    margin-right: -1em;
}

.about-avatar {
    justify-items: center;
}

.about-actions {
    display: flex;
    gap: 12px;
}

.avatar-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--accent-1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff4f4;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

/* skills */
.skills {
    background: #f9fafa;
}

.skills .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.skills-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 20px;
}

.skills-section {
    background: #f7f9fa;
    padding: 100px 0;
}

.skill-header {
    height: 40px;
    margin: 0.8em 0;
    display: flex;
    flex-direction: row;
    place-items: center;
    gap: 15px;
}

.skills-section h2 {
    text-align: center;
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 60px;
    font-family: 'Nexa-Heavy', sans-serif;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: stretch;
    margin-top: 20px;
    margin-bottom: 70px;
}

.skill-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.95));
    padding: 18px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 26px rgba(31, 41, 55, 0.12);
}

/* PROJECTS */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-card h3 {
    font-family: var(--font-title);
    font-weight: 700;
    margin: 15px;
    position: relative;
    display: inline-block; /* pour que le soulignement s’ajuste à la largeur du texte */
    transition: color 0.3s ease;
}

.project-card h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0; /* plus proche du texte */
  width: 0%;
  height: 1.5px;
  background-color: #000; /* noir (tu peux changer pour var(--text) ou autre) */
  transition: width 0.3s ease;
}

.project-card:hover h3::after {
  width: 100%;
}

.project-card p {
    color: var(--muted);
    margin: 0 15px 20px;
}

.more-projects {
    text-align: center;
    margin-top: 40px;
}

/* contact */
.contact-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap
}

/* Petite icône à gauche des boutons */
.btn-icon {
    width: 20px;
    height: auto;
    margin-right: 3px;
    vertical-align: middle;
}


/* footer */
.site-footer {
    margin-top: 4em;
    padding: 20px 0;
    background: transparent
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px
}

/* modal */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    z-index: 200
}

.modal[aria-hidden="false"] {
    display: flex
}

.modal-panel {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 92%;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2)
}

.modal-close {
    background: none;
    border: 0;
    position: absolute;
    right: 18px;
    top: 18px;
    font-size: 18px;
    cursor: pointer
}

.modal-content img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px
}

/* responsive */
@media (max-width:900px) {
    .hero-ctas .btn {
        font-size: 1rem;
        /* plus petit sur mobile */
        padding: 8px 12px;
        /* ajuste le padding si besoin */
    }

    .hero-right {
        display: none;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-bottom: 18px
    }

    .about-grid {
        flex-direction: column;
        max-width: 90%;
    }

    .skills-grid {
        grid-template-columns: repeat(1, 1fr)
    }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(140px, auto)
    }

    .nav {
        position: absolute;
        top: 60px; /* juste en dessous du header */
        right: 20px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        -moz-backdrop-filter: blur(6px);
        border-radius: 12px;
        flex-direction: column;
        gap: 0;
        padding: 12px 20px;
        display: none;
        width: 200px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

    .nav.open {
        display: flex;
    }

    .nav-link {
        padding: 10px 0;
        border-radius: 0;
        width: 100%;
    }

    .hamburger {
        display: block
    }

    .controls {
        gap: 8px
    }
}

@media (max-width:500px) {
    .avatar-frame {
        width: 160px;
        height: 160px
    }

    .site-header {
        padding: 8px
    }
}

/* small utilities */
.text-muted {
    color: var(--muted)
}

.hide {
    display: none
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-title) !important;
    letter-spacing: 0.5px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 0.5em;
}

.tags span {
    background-color: rgba(0, 0, 0, 0.029);
    /* gris doux */
    color: #333;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.tags span:hover {
    transform: translateY(-2px);
    background-color: rgba(0, 0, 0, 0.053);
}