/*
 * H'apparté — pages locales (Melun, Montpellier)
 * La ville plein cadre, puis le regard du studio, les services, la zone et l'appel.
 * Mobile d'abord ; services, phrase d'intention et bandeau d'appel viennent de studio.css.
 */

/* ============================================
   OUVERTURE : la ville plein cadre, le titre posé dessus
   ============================================ */
.city-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: var(--color-ink);
    color: var(--color-bg);
}

.city-hero--photo {
    min-height: min(84svh, 48rem);
}

.city-hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    margin: 0;
}

.city-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 35%;
}

/* Voile d'encre : le texte reste lisible quelle que soit la photo */
.city-hero--photo::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(29, 28, 26, 0.3) 0%, rgba(29, 28, 26, 0) 22%, rgba(29, 28, 26, 0.3) 42%, rgba(29, 28, 26, 0.78) 66%, rgba(29, 28, 26, 0.92) 100%);
}

.city-hero--photo .city-hero__content {
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.3);
}

.city-hero--photo .btn {
    text-shadow: none;
}

.city-hero__content {
    width: 100%;
    padding-top: clamp(5rem, 14vw, 8rem);
    padding-bottom: clamp(2.75rem, 7vw, 5rem);
}

.city-hero .eyebrow {
    margin-bottom: 1.25rem;
    color: rgba(251, 249, 246, 0.86);
}

.city-hero .eyebrow::before {
    background: currentColor;
}

.city-hero__title {
    margin: 0 0 1.25rem;
    font-size: clamp(3rem, 11vw, 7rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--color-bg);
}

.city-hero__title em {
    display: block;
    font-style: italic;
}

.city-hero__lead {
    max-width: 34rem;
    margin: 0 0 2rem;
    color: rgba(251, 249, 246, 0.86);
}

.city-credit {
    margin: 0;
    font-size: 0.625rem;
    line-height: 1.4;
    letter-spacing: 0.04em;
    color: rgba(251, 249, 246, 0.78);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.city-hero__credit {
    position: absolute;
    top: 0.75rem;
    right: var(--gutter);
    max-width: 70%;
    text-align: right;
}

@media (min-width: 900px) {
    .city-hero--photo {
        min-height: min(86svh, 54rem);
    }

    .city-hero__content {
        display: grid;
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
        column-gap: clamp(2rem, 6vw, 6rem);
        align-items: end;
    }

    .city-hero__content .eyebrow {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .city-hero__title {
        grid-column: 1;
        grid-row: 2 / span 2;
        margin: 0;
    }

    .city-hero__lead,
    .city-hero__content .btn {
        grid-column: 2;
        justify-self: start;
    }
}

.js-motion :is(.city-hero .eyebrow, .city-hero__title, .city-hero__lead, .city-hero__content .btn) {
    animation: happarte-rise 1s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.js-motion .city-hero__title { animation-delay: 0.15s; }
.js-motion .city-hero__lead { animation-delay: 0.35s; }
.js-motion .city-hero__content .btn { animation-delay: 0.5s; }

.js-motion .city-hero__media {
    animation: city-dawn 1.6s ease both;
}

@keyframes city-dawn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.city-body .entry-content {
    max-width: 46rem;
}

/* ============================================
   ZONE D'INTERVENTION : la ville en photo, les communes en grand
   ============================================ */
.city-zone__grid {
    display: grid;
    gap: clamp(2.25rem, 5vw, 3rem);
}

.city-zone__media {
    position: relative;
    margin: 0 calc(-1 * var(--gutter));
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-linen);
}

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

.city-zone__media .city-credit {
    position: absolute;
    right: var(--gutter);
    bottom: 0.6rem;
}

.city-zone__text h2 {
    margin: 0 0 1.5rem;
}

.city-zone__places {
    max-width: 34rem;
    margin: 0 0 1.75rem;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4.6vw, 2.4rem);
    font-style: italic;
    line-height: 1.25;
    color: var(--color-ink);
}

.city-zone__extra {
    max-width: 30rem;
    margin: 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

@media (min-width: 900px) {
    .city-zone__grid:not(.city-zone__grid--text) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: clamp(3rem, 7vw, 7rem);
    }

    .city-zone__media {
        margin: 0;
        aspect-ratio: 4 / 5;
    }

    .city-zone__media .city-credit {
        right: 0.9rem;
    }
}

/* Lien vers l'autre ville, sous l'appel */
.city-switch {
    margin: 1.75rem 0 0;
}
