/* CNRHP — styles communs (contenu des pages iframe) */

:root {
    --cnrhp-text: #003366;
    --cnrhp-accent: #084586;
    --cnrhp-bg: #ffffff;
}

html {
    height: auto;
    min-height: 0;
    overflow-y: auto;
}

body {
    margin: 0;
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.75rem 1rem 1.5rem;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--cnrhp-text);
    background: var(--cnrhp-bg);
}

a {
    color: var(--cnrhp-accent);
}

a:hover,
a:focus-visible {
    color: #001a33;
}

hr {
    border: none;
    border-top: 1px solid #c5d4e8;
    margin: 1.25rem auto;
    max-width: 90%;
}

/* Typographie */
.page-title {
    font-size: 1.35rem;
    font-weight: bold;
    text-align: center;
    color: var(--cnrhp-text);
    margin: 0.5rem 0 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section-title {
    font-size: 1.15rem;
    font-weight: bold;
    text-align: center;
    color: var(--cnrhp-text);
    margin: 1rem 0 0.75rem;
}

.text-center {
    text-align: center;
}

.text-body {
    font-size: 14px;
    text-align: center;
    margin: 0.5rem 0 1rem;
}

.text-small {
    font-size: 12px;
}

.text-strong {
    font-weight: bold;
}

/* Compatibilite balises legacy */
body font {
    font-family: inherit;
}

/* Accueil */
.home-intro {
    text-align: center;
    margin-bottom: 1rem;
}

.home-news {
    text-align: center;
    margin: 0 auto 1rem;
    max-width: 52rem;
}

.home-social {
    text-align: center;
    margin-top: 1rem;
}

.home-social img {
    max-width: 100%;
    height: auto;
}

/* Pied de page (bas.htm) */
body.site-footer {
    padding: 0.35rem 0.5rem 0.5rem;
}

.site-footer table {
    width: 100%;
    border-collapse: collapse;
}

.site-footer td {
    vertical-align: top;
    padding: 0.35rem;
    font-size: 12px;
    line-height: 1.45;
}

.site-footer .footer-center {
    text-align: center;
    vertical-align: middle;
}

.site-footer .footer-right {
    text-align: right;
}

.site-footer img {
    max-width: 100%;
    height: auto;
}

/* Pied de page mobile (bas.htm) — version compacte */
.footer-mobile {
    display: none;
    text-align: center;
    padding: 0.4rem 0.5rem 0.45rem;
}

.footer-mobile-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 6vw, 2rem);
    margin: 0 0 0.35rem;
}

.footer-mobile-icon img {
    width: 2.25rem;
    height: 2.25rem;
    object-fit: contain;
    display: block;
}

.footer-mobile-logo img {
    width: clamp(3rem, 14vw, 4rem);
    height: auto;
    max-height: 2.75rem;
    object-fit: contain;
    display: block;
}

.footer-mobile-contact {
    margin: 0.25rem 0 0.15rem;
    font-size: 0.95rem;
}

.footer-mobile-home {
    margin: 0 0 0.25rem;
    font-size: 0.85rem;
}

.footer-mobile-legal {
    margin: 0.15rem 0 0.1rem;
    font-size: 0.8rem;
    line-height: 1.45;
}

.footer-mobile-legal span[aria-hidden="true"] {
    margin: 0 0.35rem;
    color: #7a8fa8;
}

.footer-mobile-version {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #5a7088;
}

/* Tableaux (contact, etc.) */
.data-table {
    width: min(90%, 900px);
    margin: 0 auto 1rem;
    border-collapse: collapse;
    border: 1px solid #c5d4e8;
}

.data-table td {
    padding: 0.65rem 0.75rem;
    vertical-align: top;
    border: 1px solid #c5d4e8;
}

.data-table .cell-label {
    width: 22%;
    font-weight: bold;
    font-size: 1rem;
    background: #f4f8fc;
}

/* Archives — harmonise les anciens styles */
.archives-page {
    max-width: 56rem;
    margin: 0 auto;
}

.archives-page font {
    font-family: inherit;
}

.archives-page .archive-heading {
    font-size: 1.35rem;
    font-weight: bold;
    text-align: center;
    color: var(--cnrhp-text);
    margin: 1rem 0;
}

.archives-page .archive-year {
    font-size: 1.15rem;
    font-weight: bold;
    text-align: center;
    color: var(--cnrhp-text);
    margin: 1.25rem 0 0.75rem;
}

.archives-page p {
    margin: 0.5rem 0;
    text-align: center;
}

.archives-page img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 900px) {
    body:not(.site-footer) {
        padding: 0.5rem 0.75rem 1rem;
        font-size: 14px;
    }

    body.site-footer {
        padding: 0.2rem 0.5rem 0.4rem;
        font-size: 14px;
        overflow: visible;
    }

    .footer-desktop {
        display: none !important;
        position: absolute;
        width: 0;
        height: 0;
        overflow: hidden;
        visibility: hidden;
        pointer-events: none;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .footer-mobile {
        display: block;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .data-table .cell-label {
        width: 100%;
        border-bottom: none;
    }
}
