/* ==========================================================================
   Observatoire INOHA — site public
   S'appuie sur admin.css (mêmes couleurs, cartes, tableaux, graphiques,
   carte) et ajoute la mise en page publique.
   ========================================================================== */

body.pub {
    background: #f5f7f6;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- En-tête ---------- */
.site-top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(160%) blur(8px);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--border);
}

.site-top-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 72px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text) !important;
    min-width: 0;
}

.site-brand-logos {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.site-brand-logos img {
    height: 40px;
    width: auto;
    display: block;
}

.site-brand-sep {
    width: 1px;
    height: 34px;
    background: var(--border-strong);
}

.site-brand-text strong {
    display: block;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.2;
    white-space: nowrap;
}

.site-brand-text span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--text-2) !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.site-nav a i {
    color: var(--muted-2);
    font-size: 13px;
}

.site-nav a:hover {
    background: var(--surface-3);
    color: var(--text) !important;
}

.site-nav a.is-active {
    background: var(--primary-50);
    color: var(--primary-800) !important;
}

.site-nav a.is-active i {
    color: var(--primary-600);
}

.site-menu-btn {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 17px;
    cursor: pointer;
}

/* Bande d'alerte / dernière mise à jour */
.site-strip {
    background: var(--primary-900);
    color: #cfe3d8;
    font-size: 12.5px;
}

.site-strip .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
}

.site-strip strong {
    color: #fff;
}

.site-strip a {
    color: #8fe0b5 !important;
    font-weight: 600;
}

.strip-short { display: none; }

@media (max-width: 760px) {
    .strip-short { display: inline; }
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #ff6b5b;
    box-shadow: 0 0 0 0 rgba(255, 107, 91, .7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 91, .6); }
    70% { box-shadow: 0 0 0 8px rgba(255, 107, 91, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 91, 0); }
}

/* ---------- Onglets des phénomènes ---------- */
.pheno-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.pheno-bar .container {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pheno-bar .container::-webkit-scrollbar {
    display: none;
}

.pheno-bar-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pheno-tab {
    --ph: var(--primary-600);
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 14px 0 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-2) !important;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.pheno-tab .pheno-tab-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ph) 12%, #fff);
    color: var(--ph);
    font-size: 12px;
}

.pheno-tab:hover {
    border-color: var(--border-strong);
}

.pheno-tab.is-active {
    border-color: var(--ph);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ph) 14%, transparent);
    color: var(--text) !important;
}

.pheno-tab.is-active .pheno-tab-icon {
    background: var(--ph);
    color: #fff;
}

.pheno-tab small {
    color: var(--muted);
    font-weight: 500;
}

/* ---------- Héros / diaporama ---------- */
.hero {
    position: relative;
    background: #0b2219;
    color: #fff;
    overflow: hidden;
}

.hero-slide {
    position: relative;
    display: none;
    min-height: 430px;
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    display: block;
    animation: fadeIn .5s ease;
}

@keyframes fadeIn {
    from { opacity: .3; }
    to { opacity: 1; }
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(6, 25, 18, .92) 0%, rgba(6, 25, 18, .72) 48%, rgba(6, 25, 18, .25) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 430px;
    padding-top: 40px;
    padding-bottom: 64px;
    max-width: 720px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #bff0d4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 16px 0 0;
    color: #fff;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.hero p {
    margin-top: 14px;
    color: #d3e3db;
    font-size: 16px;
    line-height: 1.6;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.hero .btn-light {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .3);
    color: #fff !important;
}

.hero .btn-light:hover {
    background: rgba(255, 255, 255, .2);
}

.hero-controls {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 18px;
}

.hero-controls .container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dots {
    display: flex;
    gap: 6px;
}

.hero-dots button {
    width: 26px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
    cursor: pointer;
    padding: 0;
}

.hero-dots button.is-active {
    background: #fff;
    width: 40px;
}

.hero-arrow {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: rgba(0, 0, 0, .2);
    color: #fff;
    cursor: pointer;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, .15);
}

/* En-tête de page simple */
.page-hero {
    background:
        radial-gradient(900px 300px at 100% 0%, rgba(22, 147, 91, .22), transparent 60%),
        linear-gradient(135deg, #0b2219 0%, #0f3426 100%);
    color: #fff;
    padding: 38px 0 34px;
}

.page-hero .crumbs {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #9fbfb0;
    font-size: 12.5px;
}

.page-hero .crumbs a {
    color: #c5ddd1 !important;
}

.page-hero h1 {
    margin: 10px 0 0;
    color: #fff;
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.page-hero p {
    margin-top: 10px;
    color: #c5d6ce;
    font-size: 15px;
    max-width: 760px;
    line-height: 1.6;
}

/* ---------- Sections ---------- */
.section-block {
    padding: 34px 0;
}

.section-block.tight {
    padding: 22px 0;
}

.section-block.alt {
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.section-kicker {
    display: block;
    color: var(--primary-600);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section-head h2 {
    margin-top: 4px !important;
    font-size: 24px !important;
    font-weight: 750 !important;
}

.section-head p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
    max-width: 720px;
}

.situation-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
}

.situation-date i {
    color: var(--primary-600);
}

/* Indicateurs du site public : un peu plus grands */
.pub .kpi-value {
    font-size: 30px;
}

.kpi-sub {
    font-size: 12.5px;
    color: var(--muted);
}

.kpi-sub strong {
    color: var(--text);
}

/* ---------- Cartes de contenus ---------- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.post {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
    color: var(--text) !important;
    min-width: 0;
}

a.post:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.post-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--surface-3);
    overflow: hidden;
}

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

.post-media .post-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--muted-2);
    font-size: 32px;
    background: linear-gradient(135deg, #eef3f1, #e3ebe7);
}

.post-media .badge {
    position: absolute;
    left: 12px;
    top: 12px;
}

.post-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    color: var(--muted);
    font-size: 12.5px;
}

.post-title {
    font-size: 16.5px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.post-excerpt {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-foot {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: var(--primary-600);
    font-weight: 600;
}

/* Bulletins (rubrique Analyse) */
.doc-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.doc-card + .doc-card {
    margin-top: 14px;
}

.doc-card.is-featured {
    border-color: var(--primary-100);
    box-shadow: 0 0 0 3px var(--primary-50), var(--shadow-sm);
}

.doc-cover {
    width: 64px;
    height: 80px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, var(--primary-700), var(--primary-900));
    color: #fff;
    font-size: 22px;
    overflow: hidden;
}

.doc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-card h3 {
    font-size: 17px !important;
    line-height: 1.35 !important;
}

.doc-card h3 a {
    color: var(--text) !important;
}

.doc-card h3 a:hover {
    color: var(--primary-700) !important;
}

.doc-synth {
    margin-top: 8px !important;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
}

.doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.synthese-box {
    padding: 20px 22px;
    border-radius: var(--radius-lg);
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    color: var(--primary-900);
    font-size: 15.5px;
    line-height: 1.7;
}

.synthese-box h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px !important;
    color: var(--primary-700) !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px !important;
}

/* Contenu riche (articles, bulletins) */
.prose {
    color: var(--text-2);
    font-size: 16px;
    line-height: 1.75;
}

.prose > * + * {
    margin-top: 1em;
}

.prose h2,
.prose h3 {
    margin-top: 1.6em !important;
    color: var(--text);
}

.prose h2 { font-size: 21px !important; }
.prose h3 { font-size: 18px !important; }

.prose ul,
.prose ol {
    padding-left: 1.4em;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.prose th,
.prose td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
}

.prose th {
    background: var(--surface-2);
}

.prose blockquote {
    margin: 1.2em 0;
    padding: 12px 18px;
    border-left: 4px solid var(--primary-500);
    background: var(--surface-2);
    border-radius: 0 10px 10px 0;
}

.prose img {
    border-radius: 10px;
    height: auto;
}

.article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.article-main {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.article-cover {
    aspect-ratio: 16 / 8;
    background: var(--surface-3);
}

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

.article-body {
    padding: 26px 30px 30px;
}

.interpretation {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--info-50);
    border: 1px solid #c5daf1;
}

.interpretation h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px !important;
    color: #164c86 !important;
    margin-bottom: 8px !important;
}

.interpretation p {
    color: #1d3d63;
    line-height: 1.65;
}

.comment {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.comment:last-child {
    border-bottom: 0;
}

.comment-body strong {
    font-size: 14px;
}

.comment-body small {
    color: var(--muted);
    margin-left: 6px;
}

.comment-body p {
    margin-top: 4px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.55;
}

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Glossaire public */
.gloss-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gloss-letters a {
    min-width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text-2) !important;
    font-weight: 700;
    font-size: 13px;
}

.gloss-letters a:hover {
    border-color: var(--primary-500);
    color: var(--primary-700) !important;
}

.gloss-group + .gloss-group {
    margin-top: 26px;
}

.gloss-letter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--primary-700);
    font-size: 22px;
    font-weight: 800;
}

.gloss-letter::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.gloss-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.gloss-item {
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    scroll-margin-top: 140px;
}

.gloss-item:target {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-50);
}

.gloss-item dt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.gloss-item dd {
    margin: 8px 0 0;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.6;
}

.gloss-item .gloss-source {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

/* Bloc d'appel */
.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 26px 28px;
    border-radius: 18px;
    background:
        radial-gradient(600px 200px at 100% 0%, rgba(22, 147, 91, .35), transparent 60%),
        linear-gradient(135deg, #0b2219, #11402c);
    color: #fff;
}

.cta h2 {
    color: #fff !important;
    font-size: 21px !important;
}

.cta p {
    color: #c5d6ce;
    margin-top: 4px;
}

/* ---------- Pied de page ---------- */
.site-foot {
    margin-top: 40px;
    background: #0b2219;
    color: #a9c3b7;
    font-size: 14px;
}

.site-foot-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 44px 0 30px;
}

.site-foot h3 {
    color: #fff !important;
    font-size: 14px !important;
    margin-bottom: 14px !important;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.site-foot ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}

.site-foot a {
    color: #c5d6ce !important;
}

.site-foot a:hover {
    color: #fff !important;
}

.site-foot-logos {
    display: inline-flex;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 14px;
}

.site-foot-logos img {
    height: 36px;
    width: auto;
}

.site-foot-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 16px 0 22px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: #7f978c;
}

/* ---------- Responsive ---------- */
@media (max-width: 1480px) {
    .site-brand-text,
    .site-brand-sep {
        display: none;
    }
}

@media (max-width: 1100px) {
    .site-nav a {
        padding: 0 10px;
    }

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

    .site-foot-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .site-menu-btn {
        display: grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px 16px 16px;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }

    .site-top.menu-open .site-nav {
        display: flex;
    }

    .site-nav a {
        height: 46px;
        font-size: 15px;
    }

    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-brand-text,
    .site-brand-sep {
        display: block;
    }
}

@media (max-width: 760px) {
    .container {
        padding: 0 14px;
    }

    .site-top-inner {
        height: 62px;
        gap: 10px;
    }

    .site-brand-logos img {
        height: 32px;
    }

    .site-brand-text strong {
        font-size: 13.5px;
    }

    .site-brand-text span {
        display: none;
    }

    .site-strip .container {
        font-size: 12px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .site-strip .strip-link {
        display: none;
    }

    .hero-slide,
    .hero-content {
        min-height: 380px;
    }

    .hero p {
        font-size: 14.5px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-content {
        padding-top: 28px;
        padding-bottom: 86px;
        justify-content: flex-start;
    }

    .hero h1,
    .hero h2 {
        font-size: 26px;
    }

    .strip-long {
        display: none;
    }

    .section-block {
        padding: 24px 0;
    }

    .section-head h2 {
        font-size: 20px !important;
    }

    .pub .kpi-value {
        font-size: 22px;
    }

    .content-grid,
    .gloss-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .article-body {
        padding: 18px 16px 22px;
    }

    .prose {
        font-size: 15px;
    }

    .doc-card {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 14px;
        gap: 12px;
    }

    .doc-cover {
        width: 48px;
        height: 60px;
        font-size: 17px;
    }

    .site-foot-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .cta {
        padding: 20px;
    }
}

@media (max-width: 420px) {
    .site-brand-sep,
    .site-brand-text {
        display: none;
    }
}

@media print {
    .site-top,
    .site-strip,
    .pheno-bar,
    .site-foot,
    .hero-controls,
    .no-print {
        display: none !important;
    }
}

.post-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

@media (max-width: 760px) {
    .post-featured {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-featured .post-media {
        min-height: 200px !important;
    }
}

/* ==========================================================================
   Effets et finitions
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: 90px;
}

.pub ::selection {
    background: #bfe9d1;
    color: #0b2219;
}

/* En-tête qui se compacte au défilement */
.site-top {
    transition: box-shadow .25s ease, background-color .25s ease;
}

.site-top-inner {
    transition: height .25s ease;
}

.site-top.is-scrolled {
    box-shadow: 0 6px 24px rgba(16, 34, 27, .08);
}

.site-top.is-scrolled .site-top-inner {
    height: 62px;
}

.site-nav a {
    position: relative;
    transition: background-color .2s ease, color .2s ease;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 5px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary-500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
    transform: scaleX(1);
}

/* Héros : zoom lent de l'image, barre de progression */
.hero-slide {
    background: none !important;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
}

.hero-slide.is-active .hero-bg {
    animation: kenburns 9s ease-out forwards;
}

@keyframes kenburns {
    from { transform: scale(1.02); }
    to { transform: scale(1.12); }
}

.hero-slide::before {
    z-index: 1;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(700px 300px at 85% 110%, rgba(22, 147, 91, .35), transparent 70%),
        linear-gradient(0deg, rgba(6, 25, 18, .55), transparent 40%);
    pointer-events: none;
}

.hero-content {
    z-index: 2;
}

.hero-slide.is-active .hero-kicker,
.hero-slide.is-active h1,
.hero-slide.is-active h2,
.hero-slide.is-active p,
.hero-slide.is-active .hero-actions {
    animation: heroIn .7s cubic-bezier(.2, .7, .2, 1) both;
}

.hero-slide.is-active h1,
.hero-slide.is-active h2 { animation-delay: .08s; }
.hero-slide.is-active p { animation-delay: .16s; }
.hero-slide.is-active .hero-actions { animation-delay: .24s; }

@keyframes heroIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

.hero-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 4;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #34c47c, #8fe0b5);
}

.hero-progress.is-running {
    animation: heroProgress 7s linear forwards;
}

@keyframes heroProgress {
    from { width: 0; }
    to { width: 100%; }
}

/* Panneau de synthèse dans le héros (grand écran) */
.hero-panel {
    position: absolute;
    z-index: 3;
    right: max(24px, calc((100vw - 1240px) / 2 + 24px));
    top: 50%;
    transform: translateY(-50%);
    width: 320px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(8, 28, 20, .55);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    color: #fff;
    animation: panelIn .8s .3s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(calc(-50% + 18px)); }
    to { opacity: 1; transform: translateY(-50%); }
}

.hero-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #bfe0cf;
    font-weight: 600;
}

.hero-panel-head strong {
    color: #fff;
    font-size: 13px;
}

.hero-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hero-stat {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .08);
}

.hero-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.hero-stat span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #c5d6ce;
    font-size: 12px;
    font-weight: 600;
}

.hero-stat span i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.hero-panel a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    height: 38px;
    border-radius: 10px;
    background: #fff;
    color: var(--primary-800) !important;
    font-weight: 700;
    font-size: 13px;
}

@media (max-width: 1150px) {
    .hero-panel {
        display: none;
    }
}

/* En-têtes de page : formes décoratives */
.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero::before,
.page-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.page-hero::before {
    width: 420px;
    height: 420px;
    right: -120px;
    top: -220px;
    background: radial-gradient(circle, rgba(52, 196, 124, .28), transparent 65%);
    animation: float 12s ease-in-out infinite;
}

.page-hero::after {
    width: 260px;
    height: 260px;
    right: 22%;
    bottom: -170px;
    background: radial-gradient(circle, rgba(143, 224, 181, .18), transparent 65%);
    animation: float 14s ease-in-out infinite reverse;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1,
.page-hero p,
.page-hero .crumbs {
    animation: heroIn .6s cubic-bezier(.2, .7, .2, 1) both;
}

.page-hero h1 { animation-delay: .05s; }
.page-hero p { animation-delay: .12s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-24px, 18px); }
}

/* Titres de section */
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-kicker::before {
    content: "";
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

/* Apparition au défilement */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Survol des cartes */
.pub .kpi,
.pub .highlight,
.pub .gloss-item,
.pub .doc-card {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.pub .kpi:hover,
.pub .highlight:hover,
.pub .doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(16, 34, 27, .09);
}

.pub .gloss-item:hover {
    border-color: var(--primary-100);
    box-shadow: 0 8px 22px rgba(16, 34, 27, .06);
}

.post-media img {
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

a.post:hover .post-media img {
    transform: scale(1.05);
}

.post-foot i {
    transition: transform .2s ease;
}

a.post:hover .post-foot > i {
    transform: translateX(4px);
}

.btn {
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .2s ease, transform .15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.pub .btn-primary:hover {
    box-shadow: 0 6px 18px rgba(15, 123, 75, .28);
}

/* Chargement (carte, graphiques) */
.map-loading {
    z-index: 4;
    background: linear-gradient(110deg, #eef3f1 8%, #f7faf8 18%, #eef3f1 33%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

.map-loading span {
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

@keyframes shimmer {
    to { background-position: -200% 0; }
}

/* Bouton retour en haut */
.to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--primary-700);
    color: #fff;
    box-shadow: 0 10px 24px rgba(6, 61, 39, .3);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px) scale(.9);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, background-color .2s ease;
}

.to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.to-top:hover {
    background: var(--primary-800);
}

/* Pied de page : liseré */
.site-foot {
    position: relative;
}

.site-foot::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, #16935b 0%, #34c47c 35%, #e0a100 65%, #c62828 100%);
}

.pheno-tab.is-active .pheno-tab-icon {
    animation: pop .4s ease;
}

@keyframes pop {
    50% { transform: scale(1.15); }
}

.pub :focus-visible {
    outline: 3px solid rgba(22, 147, 91, .35);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

.container.hero-content {
    max-width: 1240px;
}

.hero-content > * {
    max-width: 660px;
}

@media print {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
