/* ============================================================
   PRÉSENTATION DE LA COMMUNE
============================================================ */

#presentation-hero,
#presentation-content,
#presentation-meta {
    --presentation-accent: var(--enfold-alternate-color-primary);
    --presentation-heading: var(--component-color-dark);
    --presentation-text: var(--component-color-text);
    --presentation-muted: color-mix(in srgb, var(--component-color-text) 84%, var(--component-color-bg2));
    --presentation-border: var(--component-color-border);
    --presentation-surface: var(--component-color-bg2);
    --presentation-background: var(--component-color-bg);
}

#presentation-hero,
#presentation-content,
#presentation-meta,
#presentation-hero *,
#presentation-content *,
#presentation-meta * {
    box-sizing: border-box;
}

/* Structure principale */

#presentation-content {
    background-color: var(--presentation-background);
}

#presentation-meta {
    border-top: 1px solid var(--presentation-border);
    background-color: var(--presentation-background);
}

#presentation-content .template-page.content {
    padding-top: 48px;
    padding-bottom: 24px;
}

#presentation-meta .template-page.content {
    padding-top: 0;
    padding-bottom: 24px;
}

#presentation-content .entry-content-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(270px, 0.8fr);
    align-items: start;
    gap: 52px;
}

#presentation-meta .entry-content-wrapper {
    display: block;
}

#presentation-meta .entry-content-wrapper > .flex_column {
    float: none;
    width: auto;
    margin: 0;
}

#presentation-content .entry-content-wrapper::before,
#presentation-content .entry-content-wrapper::after,
#presentation-content .presentation-stat-grid::before,
#presentation-content .presentation-stat-grid::after,
#presentation-content .presentation-geography-row::before,
#presentation-content .presentation-geography-row::after,
#presentation-content .presentation-authority-cards::before,
#presentation-content .presentation-authority-cards::after,
#presentation-meta .presentation-meta-row::before,
#presentation-meta .presentation-meta-row::after {
    display: none;
    content: none;
}

#presentation-content .entry-content-wrapper > .flex_column {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
}

.presentation-welcome-heading,
.presentation-section-heading,
.presentation-subheading,
.presentation-authority-card-title,
.presentation-related-title {
    padding: 0;
}

.presentation-welcome-heading {
    margin: 0 0 16px;
}

.presentation-welcome-heading .av-special-heading-tag,
.presentation-section-heading .av-special-heading-tag {
    line-height: 1.2;
    font-weight: 400;
}

.presentation-introduction,
.presentation-section-intro,
.presentation-authorities-intro {
    color: var(--presentation-text);
}

.presentation-introduction {
    max-width: 700px;
}

/* Images */

#top #presentation-content .presentation-main-photo {
    width: 100%;
    margin: 28px 0 0;
    overflow: hidden;
}

.presentation-main-photo img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--component-radius);
}

#top #presentation-content .presentation-main-photo .avia-image-container-inner,
#top #presentation-content .presentation-main-photo img.avia_image {
    display: block;
    width: 100%;
    max-width: none;
}

.presentation-image-caption {
    margin-top: 6px;
    color: var(--presentation-muted);
    line-height: 1.45;
}

/* Sections */

#top #presentation-content .presentation-section-heading {
    margin: 48px 0 0;
    padding-top: 40px;
}

.presentation-section-intro,
.presentation-authorities-intro {
    margin-top: 12px;
}

.presentation-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid var(--presentation-border);
    border-radius: var(--component-radius);
    background: var(--presentation-surface);
}

#top #presentation-content .presentation-stat-grid > .presentation-stat {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 24px 22px;
    border-right: 1px solid var(--presentation-border);
}

#top #presentation-content .presentation-stat-grid > .presentation-stat:last-child {
    border-right: 0;
}

.presentation-stat-number {
    margin: 0;
    color: var(--presentation-accent);
    line-height: 1;
    font-weight: 400;
    font-size: 1.9rem;
}

.presentation-stat-number small {
    color: var(--presentation-text);
}

.presentation-stat-label {
    margin: 10px 0 0;
    color: var(--presentation-text);
}

#top #presentation-content .presentation-stat-label {
    line-height: 1.3;
}

.presentation-facts {
    margin-top: 20px;
    padding: 8px 24px;
    border: 1px solid var(--presentation-border);
    border-radius: var(--component-radius);
    background: var(--presentation-surface);
}

.presentation-facts dl {
    margin: 0;
}

.presentation-facts-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
    border-bottom: 1px solid var(--presentation-border);
    line-height: 1.35;
}

.presentation-facts-row:last-child {
    border-bottom: 0;
}

.presentation-facts-row dt {
    color: var(--presentation-muted);
}

.presentation-facts-row dd {
    margin: 0;
    color: var(--presentation-heading);
    font-weight: 700;
    text-align: right;
}

/* Géographie */

.presentation-geography-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 32px;
    margin-top: 24px;
}

.presentation-geography-row > * {
    min-width: 0;
}

.presentation-geography-media {
    margin: 0;
}

.presentation-geography-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    overflow: hidden;
    border: 1px solid var(--presentation-border);
    border-radius: var(--component-radius);
}

.presentation-geography-copy {
    color: var(--presentation-text);
}

#top #presentation-content .presentation-geography-copy > p:first-child {
    margin: 0 0 12px;
}

.presentation-neighbours {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin: 0;
    padding: 16px 20px;
    border: 1px solid var(--presentation-border);
    border-radius: var(--component-radius);
    background: var(--presentation-surface);
    list-style: none;
}

.presentation-neighbours li {
    position: relative;
    margin: 0;
    padding-left: 15px;
}

.presentation-geography-note {
    margin: 12px 0 0;
    color: var(--presentation-muted);
}

.presentation-map-links {
    margin-top: 28px;
    border-top: 1px solid var(--presentation-border);
}

.presentation-map-links p {
    margin: 0;
}

.presentation-map-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 4px;
    border-bottom: 1px solid var(--presentation-border);
    color: var(--presentation-heading);
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
}

.presentation-map-links a span {
    color: inherit;
}

.presentation-map-links a span:last-child {
    color: var(--presentation-accent);
}

.presentation-map-links a:hover,
.presentation-map-links a:focus-visible {
    color: var(--presentation-accent);
}

/* Autorités */

.presentation-subheading {
    margin: 28px 0 0;
}

#top #presentation-content .presentation-roster {
    margin-top: 12px;
    padding: 4px 24px;
    border: 1px solid var(--presentation-border);
    border-radius: var(--component-radius);
    background: var(--presentation-surface);
    line-height: 1.5;
}

.presentation-roster-row {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: baseline;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--presentation-border);
}

.presentation-roster-row:last-child {
    border-bottom: 0;
}

.presentation-roster-name,
.presentation-roster-role,
.presentation-roster-duties {
    margin: 0;
}

.presentation-roster-name {
    color: var(--presentation-heading);
    font-weight: 700;
}

.presentation-roster-role {
    margin-top: 2px;
    color: var(--presentation-accent);
    font-weight: 700;
}

.presentation-roster-duties {
    color: var(--presentation-text);
}

#top #presentation-content .presentation-authority-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

#top #presentation-content .presentation-authority-cards > .presentation-authority-card {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 20px 24px;
    border: 1px solid var(--presentation-border);
    border-radius: var(--component-radius);
    background: var(--presentation-surface);
}

.presentation-authority-card-title {
    margin: 0;
}

#top #presentation-content .presentation-authority-details {
    margin-top: 14px;
    color: var(--presentation-text);
    line-height: 1.5;
}

#top #presentation-content .presentation-authority-card-title {
    margin: 0;
}

.presentation-authority-details dl {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

.presentation-authority-details dl div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.presentation-authority-details dt {
    color: var(--presentation-muted);
}

.presentation-authority-details dd {
    margin: 0;
    color: var(--presentation-heading);
    font-weight: 700;
    text-align: right;
}

.presentation-session-note {
    margin: 16px 0 0;
    color: var(--presentation-muted);
}

#top #presentation-content .presentation-council-button {
    margin-top: 20px;
}

#top #presentation-content .presentation-authorities-link {
    margin-top: 10px;
}

#top #wrap_all #presentation-content .presentation-council-button .avia-button {
    border: 1px solid var(--presentation-accent) !important;
    border-radius: var(--component-radius);
    background: transparent !important;
    color: var(--presentation-accent) !important;
    box-shadow: none;
}

#top #wrap_all #presentation-content .presentation-council-button .avia-button:hover,
#top #wrap_all #presentation-content .presentation-council-button .avia-button:focus-visible {
    background: var(--presentation-accent) !important;
    color: var(--component-color-text-invert) !important;
}

#top #presentation-content .presentation-authorities-link a {
    color: var(--presentation-accent);
    font-weight: 700;
    text-decoration: none;
}

#top #presentation-content .presentation-authorities-link a:hover,
#top #presentation-content .presentation-authorities-link a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Colonne latérale */

#top #presentation-content .presentation-contact-card {
    padding: 24px 24px 28px;
    border: 1px solid var(--presentation-border);
    border-radius: var(--component-radius-lg);
    background: var(--presentation-surface);
}

#top #presentation-content .presentation-contact-card h2 {
    margin: 0 0 22px;
    color: var(--presentation-heading);
}

#top #presentation-content .presentation-contact-card h3 {
    margin: 18px 0 0;
}

#top #presentation-content .presentation-contact-card p {
    margin: 0;
    color: var(--presentation-text);
    line-height: 1.5;
}

#top #presentation-content .presentation-contact-card p + p {
    margin-top: 12px;
}

#top #presentation-content .presentation-contact-card hr {
    margin: 22px 0;
    border: 0;
    border-top: 1px solid var(--presentation-border);
}

#top #presentation-content .presentation-contact-phone {
    color: var(--presentation-accent);
    font-weight: 700;
    text-decoration: none;
}

#top #presentation-content .presentation-contact-card a[href^="mailto:"] {
    color: var(--presentation-heading);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.presentation-contact-hours {
    margin-top: 10px !important;
    color: var(--presentation-heading) !important;
}

#top #presentation-content .presentation-call-button {
    display: block;
    min-height: 44px;
    margin-top: 24px;
    padding: 11px 8px;
    border: 1px solid var(--presentation-accent);
    border-radius: var(--component-radius);
    color: var(--presentation-accent);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}

#top #presentation-content .presentation-call-button:hover,
#top #presentation-content .presentation-call-button:focus-visible {
    background: var(--presentation-accent);
    color: var(--component-color-text-invert);
}

.presentation-related-title {
    margin: 28px 0 12px;
}

.presentation-related-links {
    border-top: 1px solid var(--presentation-border);
}

.presentation-related-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.presentation-related-links li {
    margin: 0;
    border-bottom: 1px solid var(--presentation-border);
}

.presentation-related-links li::before {
    display: none;
    content: none;
}

.presentation-related-links a {
    display: block;
    padding: 14px 0;
    color: var(--presentation-text);
    line-height: 1.35;
    text-decoration: none;
}

.presentation-related-links a:hover,
.presentation-related-links a:focus-visible {
    color: var(--presentation-accent);
}

/* Métadonnées */

#top #presentation-meta .presentation-meta-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: space-between;
    gap: 16px 32px;
    margin: 0;
}

.presentation-meta {
    color: var(--presentation-muted);
}

.presentation-meta p {
    margin: 0;
}

.presentation-meta-links {
    text-align: right;
}

.presentation-meta a {
    color: var(--presentation-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Responsive */

@media only screen and (max-width: 989px) {
    #presentation-content .entry-content-wrapper {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .presentation-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 24px;
    }

    .presentation-sidebar .presentation-contact-card {
        grid-row: 1 / span 2;
    }

    .presentation-sidebar .presentation-related-title,
    .presentation-sidebar .presentation-related-links {
        margin-top: 0;
    }

}

@media only screen and (max-width: 767px) {
    #presentation-hero > .container,
    #presentation-content > .container,
    #presentation-meta > .container {
        width: calc(100% - 36px);
        max-width: calc(100% - 36px);
    }

    #presentation-hero .container {
        height: auto !important;
        min-height: 0 !important;
    }

    #presentation-hero {
        min-height: 0 !important;
    }

    #presentation-hero .template-page.content {
        padding-top: 28px;
        padding-bottom: 32px;
    }

    .presentation-hero-inner {
        padding: 0;
    }

    .presentation-breadcrumb {
        margin-bottom: 24px;
    }

    #presentation-content .template-page.content {
        padding-top: 36px;
        padding-bottom: 24px;
    }

    #presentation-content .entry-content-wrapper {
        gap: 36px;
    }

    .presentation-main-photo img,
    .presentation-geography-image {
        height: auto;
        aspect-ratio: auto;
    }

    #top #presentation-content .presentation-section-heading {
        margin-top: 38px;
        padding-top: 30px;
    }

    .presentation-stat-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    #top #presentation-content .presentation-stat-grid > .presentation-stat {
        border-right: 0;
        border-bottom: 1px solid var(--presentation-border);
    }

    #top #presentation-content .presentation-stat-grid > .presentation-stat:last-child {
        border-bottom: 0;
    }

    .presentation-facts-row {
        flex-direction: column;
        gap: 6px;
    }

    .presentation-facts-row dd {
        text-align: left;
    }

    .presentation-geography-row,
    #top #presentation-content .presentation-authority-cards,
    .presentation-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .presentation-sidebar .presentation-contact-card {
        grid-row: auto;
    }

    .presentation-neighbours {
        grid-template-columns: minmax(0, 1fr);
    }

    .presentation-map-links a {
        align-items: flex-start;
    }

    .presentation-roster-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }

    #top #presentation-content .presentation-council-button .avia-button-wrap,
    #top #presentation-content .presentation-council-button .avia-button {
        width: 100%;
    }

    #top #presentation-meta .presentation-meta-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .presentation-meta-links {
        text-align: left;
    }
}
