/*
 * Correctif ciblé — alignement du fil d'Ariane avec le titre du site.
 */

:root {
    --oeuvres-gap-mobile: 4px;
    --oeuvres-gap-desktop: 6px;
    --oeuvres-text: #111;
    --oeuvres-muted: #6f6f6f;
}

/*
 * Le thème ajoutait une marge / largeur au conteneur principal.
 * On la neutralise explicitement.
 */
html body main#primary.oeuvres-page,
html body main#primary.oeuvre-single,
html body main#primary.demarche-page,
html body main#primary.contact-page {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;

    padding: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;

    position: relative !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;

    box-sizing: border-box !important;

    flex: 1 0 auto;
    background: #fff;
    color: var(--oeuvres-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.oeuvres-header-space {
    height: 4px;
}

/*
 * Le titre du site démarre actuellement à 16px :
 * le fil d'Ariane est donc forcé sur le même axe.
 */
html body main#primary.oeuvres-page > .oeuvres-breadcrumb,
html body main#primary.oeuvre-single > .oeuvres-breadcrumb,
html body main#primary.demarche-page > .oeuvres-breadcrumb,
html body main#primary.contact-page > .oeuvres-breadcrumb {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    margin-left: 0 !important;

    padding-top: 0 !important;
    padding-right: 16px !important;
    padding-bottom: 18px !important;
    padding-left: 16px !important;

    position: relative !important;
    left: 0 !important;
    transform: none !important;

    box-sizing: border-box !important;

    color: var(--oeuvres-muted);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
}

.oeuvres-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.oeuvres-breadcrumb a:hover,
.oeuvres-breadcrumb a:focus-visible {
    color: var(--oeuvres-text);
}

.oeuvres-breadcrumb-separator {
    color: #b5b5b5;
}

/* Galerie : inchangée dans son principe */
.oeuvres-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--oeuvres-gap-mobile);
    padding: 0 16px;
    margin: 0 !important;
    box-sizing: border-box;
}

.oeuvres-grid-item {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.oeuvres-grid-link {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f4f4f4;
}

.oeuvres-grid-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (min-width: 700px) {
    .oeuvres-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: var(--oeuvres-gap-desktop);
    }
}

@media (min-width: 1200px) {
    .oeuvres-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }
}

/* Fiche individuelle */
.oeuvre-single-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 56px;
}

.oeuvre-single-figure {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 0 clamp(28px, 4vw, 50px);
}

.oeuvre-single-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(76vh, 900px);
    height: auto;
    object-fit: contain;
}

.oeuvre-single-header {
    width: min(760px, 100%);
    margin: 0 auto;
}

.oeuvre-single-title {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 30px);
    font-weight: 450;
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.oeuvre-single-meta {
    display: block;
    margin-top: 14px;
    color: var(--oeuvres-muted);
    font-size: 13px;
    line-height: 1.65;
}

.oeuvre-meta-line {
    display: block;
    width: 100%;
}

.oeuvre-single-description {
    margin-top: 24px;
    font-size: 14px;
    line-height: 1.7;
}

.oeuvre-single-text {
    width: min(760px, 100%);
    margin: 28px auto 0;
    font-size: 15px;
    line-height: 1.75;
}

.oeuvre-navigation {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    width: min(760px, 100%);
    margin: 48px auto 0;
    padding-top: 22px;
    border-top: 1px solid #ededed;
    font-size: 12px;
}

.oeuvre-navigation a {
    color: var(--oeuvres-text);
    text-decoration: none;
}

.oeuvre-navigation-next {
    margin-left: auto;
    text-align: right;
}

.oeuvres-pagination {
    padding: 42px 16px 30px;
    font-size: 13px;
}

.oeuvres-empty {
    padding: 30px 16px;
    color: var(--oeuvres-muted);
    font-size: 14px;
}

@media (max-width: 520px) {
    .oeuvres-header-space {
        height: 2px;
    }

    html body main#primary.oeuvres-page > .oeuvres-breadcrumb,
    html body main#primary.oeuvre-single > .oeuvres-breadcrumb,
    html body main#primary.demarche-page > .oeuvres-breadcrumb,
html body main#primary.contact-page > .oeuvres-breadcrumb {
        padding-bottom: 14px !important;
    }

    .oeuvre-navigation {
        flex-direction: column;
    }

    .oeuvre-navigation-next {
        margin-left: 0;
        text-align: left;
    }
}

/* --------------------------------------------------
   PAGE DÉMARCHE
   Même axe, typographie et rythme visuel que les pages Œuvres.
-------------------------------------------------- */

.demarche-content {
    width: min(760px, calc(100% - 32px));
    margin: 0 0 0 16px;
    padding: 8px 0 60px;
    box-sizing: border-box;
}

.demarche-title {
    margin: 0 0 28px;
    color: var(--oeuvres-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.demarche-text {
    width: 100%;
    margin: 0;
    color: var(--oeuvres-text);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.75;
}

.demarche-text p {
    margin: 0 0 24px;
}

.demarche-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 520px) {
    .demarche-content {
        width: calc(100% - 32px);
        margin-left: 16px;
        padding-top: 6px;
        padding-bottom: 45px;
    }

    .demarche-title {
        margin-bottom: 24px;
    }

    .demarche-text {
        font-size: 14px;
        line-height: 1.7;
    }
}


/* --------------------------------------------------
   PAGE CONTACT
   Même structure visuelle que la page Démarche.
-------------------------------------------------- */

.contact-content {
    width: min(760px, calc(100% - 32px));
    margin: 0 0 0 16px;
    padding: 8px 0 60px;
    box-sizing: border-box;
}

.contact-title {
    margin: 0 0 28px;
    color: var(--oeuvres-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.contact-block {
    width: 100%;
    margin: 0;
}

.contact-label {
    margin: 0 0 14px;
    color: var(--oeuvres-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.contact-address {
    margin: 0;
    color: var(--oeuvres-text);
    font-family: inherit;
    font-size: 15px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.75;
}

.contact-map-link {
    display: inline-block;
    margin-top: 22px;
    color: var(--oeuvres-muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
    transition: color 160ms ease;
}

.contact-map-link:hover,
.contact-map-link:focus-visible {
    color: var(--oeuvres-text);
}

.contact-map-link:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 4px;
}

@media (max-width: 520px) {
    .contact-content {
        width: calc(100% - 32px);
        margin-left: 16px;
        padding-top: 6px;
        padding-bottom: 45px;
    }

    .contact-title {
        margin-bottom: 24px;
    }

    .contact-address {
        font-size: 14px;
        line-height: 1.7;
    }
}
