@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Lato:wght@300;400;700;900&display=swap');

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

:root {
    --bg-color: #ffffff;
    --text-color: #0A0A0A;
    --nav-link-color: #0A0A0A;
    --nav-link-active: #AFAFAF;
    --font: "Lato", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #f0f0f0;
        --nav-link-color: #666;
        --nav-link-active: #f0f0f0;
    }
}

html {
    height: 100%;
    margin: 0;
}

body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background-color: var(--bg-color);
    color: var(--text-color);
    display: block;
    background-color: white;
}

/* ── Navbar ── */
.navbar {
    font-family: "Lato", sans-serif;
    font-weight: 900;
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    padding: 11px 16px;
    flex-wrap: wrap;
}

.navbar__brand {
    font-size: 20px;
    font-family: "Lato", sans-serif;
    font-weight: 900;
    font-style: normal;
    color: var(--text-color);
    text-decoration: none;
}

.navbar__brand:hover {
    color: var(--nav-link-active);
}

.navbar__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar__menu a {
    font-size: 18px;
    font-family: "Lato", sans-serif;
    font-weight: 900;
    font-style: normal;
    color: var(--nav-link-color);
    text-decoration: none;
    transition: color 0.15s ease;
}

.navbar__menu a:hover,
.navbar__menu a.active {
    color: var(--nav-link-active);
}

.img-logo{
    height: 60px;
    width: 110px;
}

.navbar__burger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1000;
}

.burger-bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px 0;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* --- Styles Mobile --- */
@media (max-width: 768px) {
    .navbar__burger {
        display: block;
    }

    .navbar__menu {
        position: fixed;
        right: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 70%;
        height: 100vh;
        padding-top: 100px;
        gap: 2rem;
        transition: 0.3s ease;
        box-shadow: -10px 0 15px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .navbar__menu.is-active {
        right: 0;
    }

    .navbar__burger.is-active .burger-bar:nth-child(2) { opacity: 0; }
    .navbar__burger.is-active .burger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .navbar__burger.is-active .burger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── Contenu principal ── */
.main-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 2rem;
    flex: 1 0 auto;
}

/* ── Cards (liste projets) ── */
.projects-page {
    font-family: "Lato", sans-serif;
    font-weight: 300;
    padding: 20px 20px 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 32px;
    margin: 0 auto;
    justify-content: center;
    width: 100%;
    max-width: 1600px; 
}

.project-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    overflow: hidden;
    align-items: center;
    width: 100%;
}

.project-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.card-image-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.4s ease;
}

.card-image-wrapper .img-hover {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.project-card:hover .card-image-wrapper .img-primary {
    opacity: 1; /* reset */
}

.project-card:has(.img-hover):hover .card-image-wrapper .img-primary {
    opacity: 0;
}

.project-card:hover .card-image-wrapper .img-hover {
    opacity: 1;
}

.card-info {
    width: 100%;
    text-align: left;
}

.card-titre,
.pub-card__titre {
    font-family: "Lato", sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 0.7rem;
    color: #2a2a2a;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    transition: color 0.2s ease;
    padding-top: 10px;
    letter-spacing: 0.15em;
}

.project-card:hover .card-titre {
    color: var(--nav-link-active);
}

.no-projects {
    text-align: center;
    color: #999;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    margin-top: 80px;
}

/* Passage à 2 colonnes */
@media (max-width: 1640px) {
    .projects-grid {
        grid-template-columns: repeat(2, 448px);
        max-width: 928px;
    }
}

/* Passage à 1 colonne */
@media (max-width: 1160px) {
    .projects-grid {
        grid-template-columns: 448px;
        max-width: 448px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .card-image-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        width: 300px;
    }

    .card-titre,
.pub-card__titre {
    font-family: "Lato", sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 0.45rem;
    color: #2a2a2a;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    transition: color 0.2s ease;
    padding-top: 10px;
    letter-spacing: 0.15em;
}
}


/* ── Page projet détail ── */

.projet-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    width: 100%;
}

.projet-page {
    display: block;
}

/* colonne texte */
.projet-info {
    grid-column: 1;
    position: sticky;
    top: 40px;
}

/* colonnes images */
.col-images {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* force placement strict */
.col-left {
    grid-column: 2;
}

.col-right {
    grid-column: 3;
}

/* images */
.img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* responsive */
@media (max-width: 1100px) {

    .projet-info {
        position: static !important;
        top: auto !important;
    }

    .projet-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px;
    }

    .col-images {
        width: 100%;
    }
}

/* Footer */
.footer {
    flex-shrink: 0;
    background-color: #ffffff;
    color: #000000;
    padding: 40px 0;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
}

.footer::before {
    content: '';
    display: block;
    width: calc(100% - 80px);
    margin: 0 auto 40px auto;
    height: 1px;
    background-color: #000000;
}

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

.footer__brand {
    font-weight: 900;
    text-transform: none;
    font-size: 1.1rem;
    margin-bottom: 15px !important;
}

.footer__column p {
    margin: 5px 0;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.footer__right-group {
    display: flex;
    align-items: center;
    gap: 50px;
}

.footer__column--contact {
    text-align: right;
}

.footer__column--contact a {
    color: #000000;
    text-decoration: none;
}

.footer__social a:hover svg {
    opacity: 0.4;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Responsive Mobile */
@media (max-width: 850px) {
    .footer::before {
        width: calc(100% - 40px);
        margin-bottom: 30px;
    }

    .footer__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .footer__right-group {
        width: 100%;
        justify-content: space-between;
        flex-direction: row;
    }

    .footer__column--contact {
        text-align: left;
    }
}

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.is-open {
    display: flex;
}

.lightbox__img-wrap {
    width: 90vw;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img-wrap img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.lightbox__close {
    position: fixed;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 1001;
}

.lightbox__close:hover { opacity: 1; }

.lightbox__nav {
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    padding: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
    user-select: none;
}

.lightbox__nav:hover { opacity: 1; }

.lightbox__counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.08em;
}

.lightbox-trigger:hover{
    opacity: 50%;
}

/* ── Latest projects ── */
.latest-projects {
    margin-top: 80px;
    padding-bottom: 80px;
}

.latest-title {
    font-family: "Lato", sans-serif;
    font-weight: 900;
    font-style: normal;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #000000;
    margin: 0 0 32px;
}

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

.latest-grid .card-image-wrapper {
    aspect-ratio: 3 / 2;
    height: auto;
}

@media (max-width: 768px) {
    .latest-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Page Agence ── */
.agence-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 40px;
    font-family: 'Lato', sans-serif;
}

.agence-layout {
    display: grid !important;
    grid-template-columns: 1fr 400px !important;
    gap: 80px !important;
    align-items: start !important;
}

/* Texte à gauche */
.agence-content {
    min-width: 0;
}

.agence-photo {
    width: 400px;
}

.agence-biographie p {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 25px;
    font-weight: 300;
}

.agence-section {
    margin-top: 50px;
}

.agence-section h2,
.agence-titre {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 20px;
    margin-top: 0;
}

.agence-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agence-list li {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 300;
}

.agence-contact-details p {
    font-size: 14px;
    color: #666;
    margin: 5px 0;
    font-weight: 300;
}

.contact-link {
    margin-top: 20px !important;
}

.contact-link a {
    color: #666;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
}

.agence-social {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}

.agence-social a {
    text-decoration: none;
    line-height: 0;
    transition: opacity 0.3s ease;
}

.agence-social a:hover {
    opacity: 0.5;
}

/* Photo à droite */
.agence-photo {
    flex: 0 0 400px;
}

.agence-photo img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive Mobile */
@media (max-width: 900px) {
    
    .agence-container {
        height: auto !important;
        min-height: 0 !important;
        padding-top: 20px !important;
    }

    .agence-layout {
        display: flex !important;
        flex-direction: column !important; 
        gap: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .agence-photo {
        order: 1 !important;
        max-width: 300px !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto 0 auto !important;
        padding: 0 !important;
    }

    .agence-photo img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .agence-content {
        order: 2 !important;
        width: 100% !important;
        height: auto !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .agence-content *,
    .agence-biographie,
    .agence-biographie * {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    p:empty, div:empty {
        display: none !important;
    }
}


/* ── Prix & Publications ── */

.prix-publications {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 40px;
    font-family: 'Lato', sans-serif;
}

/* bloc section identique aux blocs agence */
.prix-publications__section {
    margin-bottom: 50px;
}

/* titre identique agence-titre */
.prix-publications__titre {
    font-size: 28px;
    font-weight: 300;
    margin: 0 0 20px 0;
    color: #000;
}

/* liste = même style que texte agence */
.prix-publications__liste {
    list-style: none;
    padding: 0;
    margin: 0;
}

.prix-publications__liste li {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    font-weight: 300;
    margin-bottom: 8px;
}

.prix-publications__liste--spaced {
    margin-top: 16px;
}


/* ── Typographie partagée (agence, publications, projets) ── */
.titre-section {
    font-size: 28px;
    font-weight: 300;
    margin: 0 0 20px 0;
    color: #000;
}

.texte-corps p,
.texte-corps li {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    font-weight: 300;
    margin-bottom: 8px;
}