/* Variables de couleurs */
:root {
    --blanc-casse: #F8F8F8;
    --gris-fonce: #1C1C1C;
    --gris-moyen: #6E6E6E;
    --anthracite: #0F0F0F;
    --jaune-accent: #FFC300;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--blanc-casse);
    color: var(--gris-fonce);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header et Navigation */
header {
    background-color: var(--blanc-casse);
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--gris-moyen);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gris-fonce);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--jaune-accent);
}

/* Hero Section - Réduit */
main {
    margin-top: 80px;
}

.hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 5%;
    background-color: var(--blanc-casse);
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 700;
    color: var(--gris-fonce);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.6rem;
    color: var(--gris-moyen);
    font-weight: 400;
}

/* Portfolio Grid - Réduit */
.portfolio-grid {
    padding: 3.5rem 5%;
    background-color: var(--blanc-casse);
}

.grid-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.portfolio-card {
    background-color: var(--anthracite);
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 320px;
    display: flex;
    align-items: flex-end;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 15, 15, 0.3) 0%, rgba(15, 15, 15, 0.85) 100%);
    transition: background 0.3s ease;
    z-index: 1;
}

.portfolio-card:hover .card-overlay {
    background: linear-gradient(to bottom, rgba(15, 15, 15, 0.2) 0%, rgba(15, 15, 15, 0.9) 100%);
}

.card-content {
    position: relative;
    z-index: 2;
}

.portfolio-card h2 {
    color: var(--blanc-casse);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.portfolio-card p {
    color: var(--blanc-casse);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.card-arrow {
    color: var(--jaune-accent);
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
    align-self: flex-start;
}

.portfolio-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Barre d'accent en haut de la carte */
.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--jaune-accent);
    transition: width 0.4s ease;
    z-index: 10;
}

.portfolio-card:hover::before {
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--anthracite);
    color: var(--gris-moyen);
    text-align: center;
    padding: 2rem 5%;
    font-size: 0.9rem;
}

/* Bento Grid Gallery - Réduit */
.gallery-section {
    padding: 3.5rem 5%;
    background-color: var(--blanc-casse);
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    grid-auto-rows: 280px;
    grid-auto-flow: dense;
}

.bento-item {
    overflow: hidden;
    background-color: var(--gris-moyen);
    transition: transform 0.3s ease;
    cursor: pointer;
    border-radius: 15px;
}

.bento-item:hover {
    transform: scale(1.02);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Variations de taille */
.bento-item.large {
    grid-row: span 2;
}

.bento-item.large-horizontal {
    grid-column: span 2;
}

.bento-item.medium {
    grid-row: span 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .bento-item.large-horizontal {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 30vh;
        padding: 2rem 5%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

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

    .logo-img {
        height: 40px;
    }

    header {
        padding: 1rem 3%;
    }

    .portfolio-grid {
        padding: 2.5rem 3%;
    }

    .portfolio-card {
        min-height: 280px;
    }

    .gallery-section {
        padding: 2.5rem 3%;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }
    
    .bento-item.large {
        grid-row: span 1;
    }
    
    .bento-item.large-horizontal {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 25vh;
        padding: 1.5rem 5%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .logo-img {
        height: 35px;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .portfolio-card {
        min-height: 250px;
    }

    .portfolio-card h2 {
        font-size: 1.5rem;
    }

    .portfolio-grid {
        padding: 2rem 3%;
    }

    .gallery-section {
        padding: 2rem 3%;
    }
}