/*
 * Presentation system layer.
 * Keeps each template's art direction intact while aligning the shared
 * reading width, controls, focus states and semantic color roles.
 */
:root {
    --pres-surface: color-mix(in srgb, var(--pres-primary) 4%, #ffffff);
    --pres-surface-muted: color-mix(in srgb, var(--pres-secondary) 7%, #f4f6f3);
    --pres-line: color-mix(in srgb, var(--pres-contrast) 14%, transparent);
    --pres-text: var(--pres-contrast);
    --pres-muted: color-mix(in srgb, var(--pres-contrast) 62%, #ffffff);
    --pres-content-width: 100%;
    --pres-control-height: 50px;
    --pres-control-radius: 8px;
}

.spec-page {
    overflow: hidden;
}

.spec-page :where(img) {
    max-width: 100%;
}

.spec-page :where(section) {
    scroll-margin-top: 84px;
}

/* One reading rhythm for the specialite family; heroes keep their own art direction. */
@media (min-width: 769px) {
    .spec-page :is(section:not([class*="hero"])) {
        padding-block: clamp(56px, 6vw, 96px);
    }
}

@media (max-width: 768px) {
    .spec-page :is(section:not([class*="hero"])) {
        padding-block: 48px;
    }
}

.spec-page :where(h1, h2, h3) {
    text-wrap: balance;
}

.spec-page :where(a[class*="-btn"], a[class*="-cta"], button) {
    min-height: var(--pres-control-height);
    align-items: center;
    justify-content: center;
    transition: transform .22s ease, background-color .22s ease,
        border-color .22s ease, color .22s ease, box-shadow .22s ease;
}

.spec-page :where(a[class*="-btn"], a[class*="-cta"], button, input, select, textarea):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--pres-primary) 44%, transparent);
    outline-offset: 3px;
}

.spec-page :where(.aap-wrap, .bcd-wrap, .sch-wrap, .pmai-wrap, .pmec-wrap, .pmvc-wrap) {
    width: var(--pres-content-width);
}

/* Modern dark surfaces: contrast is a role, not a competing accent. */
.spec-page :where(
    .pmvc-btn-primary, .pmvc-btn-secondary:hover, .pmvc-nav-cta, .pmvc-footer,
    .pmec-btn-primary, .pmec-btn-secondary:hover, .pmec-nav-cta, .pmec-dark, .pmec-footer
) {
    background: var(--pres-contrast) !important;
}

/* Keep common compact templates legible when an admin chooses a very dark contrast. */
.spec-page :where(.pmvc-btn-primary, .pmec-btn-primary) {
    color: #fff !important;
}

/* Icônes réseaux sociaux (Facebook/Instagram), partagées par tous les templates specialite. */
.pres-social {
    display: flex;
    gap: .6rem;
}

.pres-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--pres-line);
    color: var(--pres-primary);
    font-size: 15px;
    transition: background .2s, color .2s;
}

.pres-social a:hover {
    background: var(--pres-primary);
    color: #fff;
}

.pres-social--light a {
    border-color: rgba(255, 255, 255, .4);
    color: #fff;
}

.pres-social--light a:hover {
    background: #fff;
    color: var(--pres-primary);
}

@media (prefers-reduced-motion: reduce) {
    .spec-page :where(*) {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* Bug Leaflet connu, commun à toutes les cartes "cabinet/adresse" des templates présentation
   (générique et spécialité) : les tuiles restent en visibility:hidden quand l'évènement 'load'
   ne se déclenche pas (tuile déjà en cache navigateur au moment où Leaflet attache son
   listener), laissant le fond gris du conteneur visible à la place de la carte. Règle globale
   (pas scopée à une classe de conteneur précise) car chaque template nomme sa carte différemment
   (pres-map-image, btpa-contact__map-bg, etc.) — ce fichier étant chargé en dernier par les deux
   layouts de présentation, elle couvre l'ensemble des templates avec carte.
*/
.leaflet-tile {
    visibility: visible !important;
}
