/* Chrome, Safari, Edge */
::-webkit-scrollbar {
  display: none;
}

/* Firefox */
html {
  scrollbar-width: none;
}

/* IE/Edge Legacy */
html {
  -ms-overflow-style: none;
}

:root {
    --color-bg: #F9F9F9;
    --color-text-primary: #1e1e1e;
    --color-text-secondary: #727272;
    --color-text-muted: #5b5b5b;
    --color-text-footer: #6b6b6b;
    --color-button-bg: #353738;
    --color-separator: #52525b;

    --font-sans: 'Instrument Sans', Helvetica, Arial, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-dm: 'DM Sans', Helvetica, Arial, sans-serif;

    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-2xl: 64px;
    --spacing-3xl: 90px;

    --header-height: 104px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

.header {
    background-color: transparent;
    padding: 22px var(--spacing-md); /* 24px pour mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.header-container {
    max-width: 1920px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: fill;
    transition: transform 0.3s ease;
    will-change: transform;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
    transition: transform 0.3s ease;
    will-change: transform;
}

.nav-link {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.44;
    color: var(--color-text-primary);
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.8;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 30px;
    height: 24px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.about-section {
    padding: var(--spacing-3xl) var(--spacing-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2xl);
    align-items: center;
    max-width: 1440px;
    margin: 0 auto;
    padding-top: calc(var(--header-height) + var(--spacing-3xl));
}

.hero-title {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 48px;
    line-height: 1.2;
    color: var(--color-text-primary);
    max-width: 900px;
}

.hero-title .bold {
    font-weight: 700;
}

.hero-title .serif {
    font-family: var(--font-serif);
    font-style: italic;
}

.hero-description {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    max-width: 800px;
}

.hero-description strong {
    font-weight: 600;
    color: var(--color-text-primary);
}

.portfolio-section {
    padding: var(--spacing-3xl) 48px;
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
}

.portfolio-container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.portfolio-card {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.portfolio-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portfolio-title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 32px;
    line-height: 1.4;
    color: var(--color-text-primary);
}

.portfolio-description {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    color: var(--color-text-muted);
}

.footer {
    background-color: var(--color-bg);
    padding: var(--spacing-3xl) var(--spacing-md);
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    max-width: 589px;
}

.footer-title {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 32px;
    line-height: 1.75;
    color: var(--color-text-primary);
}

.footer-email {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 32px;
    line-height: 1.75;
    color: var(--color-text-primary);
    word-break: break-word;
}

.contact-button {
    width: 144px;
    height: 46px;
    background-color: var(--color-button-bg);
    color: white;
    border-radius: 1000px;
    font-family: var(--font-dm);
    font-weight: 700;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.contact-button:hover {
    background-color: #494b4d;
}

.footer-separator {
    width: 100%;
    height: 1px;
    background-color: var(--color-separator);
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-link,
.footer-link-right {
    font-family: var(--font-dm);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.44;
    color: var(--color-text-footer);
    transition: color 0.3s ease;
}

.footer-link:hover,
.footer-link-right:hover {
    color: var(--color-text-primary);
}

@media (min-width: 768px) {
    .header {
        padding: 22px 48px;
    }

    .hero-title {
        font-size: 64px;
    }

    .hero-description {
        font-size: 20px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px 64px; /* Ajustement du gap horizontal */
    }

    .portfolio-title {
        font-size: 40px;
    }

    .portfolio-description {
        font-size: 20px;
    }

    .about-section {
        padding: var(--spacing-3xl) var(--spacing-xl); /* 48px */
        padding-top: calc(var(--header-height) + var(--spacing-3xl));
    }

    .portfolio-section {
        padding: var(--spacing-3xl) var(--spacing-xl); /* 48px */
    }

    .footer {
        padding: var(--spacing-3xl) var(--spacing-xl); /* 48px */
    }

    .footer-title, .footer-email {
        font-size: 40px;
    }

    .footer-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Grande Taille (Desktop, min-width: 1024px) */
@media (min-width: 1024px) {
    .header {
        padding: 22px 366px;
    }

    .hero-title {
        font-size: 86px;
        line-height: 1;
    }

    .hero-description {
        font-size: 24px;
    }

    .about-section {
        padding: var(--spacing-3xl) 366px;
        padding-top: calc(var(--header-height) + var(--spacing-3xl));
    }

    .portfolio-section {
        padding: var(--spacing-3xl) 366px;
    }

    .footer {
        padding: var(--spacing-3xl) 366px;
    }
}

/* Petite Taille (Mobile, max-width: 767px) */
@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-bg);
        flex-direction: column;
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: var(--spacing-sm);
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .portfolio-title {
        font-size: 28px;
    }

    .portfolio-description {
        font-size: 16px;
    }

    .footer-title {
        font-size: 24px;
    }

    .footer-email {
        font-size: 20px;
    }

    .header {
        padding: 22px var(--spacing-md); /* 24px */
    }

    .about-section {
        padding: var(--spacing-2xl) var(--spacing-md); /* 64px haut/bas, 24px gauche/droite */
        padding-top: calc(var(--header-height) + var(--spacing-2xl));
    }

    .portfolio-section {
        padding: var(--spacing-2xl) var(--spacing-md); /* 64px haut/bas, 24px gauche/droite */
    }

    .footer {
        padding: var(--spacing-2xl) var(--spacing-md); /* 64px haut/bas, 24px gauche/droite */
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}