/* ==========================================================================
   Laboratoires de recherche — index (.estc-labs) and lab page (.estc-lab-page)
   Tokens come from mysite/css/estc_theme.css
   ========================================================================== */

/* ---- Shared labels ---- */
.estc-labs__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px;
    font-family: var(--estc-font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--estc-primary);
}

.estc-labs__eyebrow::before {
    content: '';
    width: 40px;
    height: 2px;
    background: #c9a227;
}

.estc-labs__eyebrow--light,
.estc-labs__eyebrow--light a {
    color: #e2c46a;
}

.estc-labs__eyebrow--light a:hover {
    color: #fff;
}

/* ==========================================================================
   Index
   ========================================================================== */

.estc-labs {
    position: relative;
    overflow: hidden;
    padding: 80px 0 112px;
    background:
        radial-gradient(900px 420px at 100% 0%, rgba(0, 75, 130, .05), transparent 65%),
        #f6f7f9;
}

.estc-labs::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 40%;
    height: 520px;
    background: url('../../../mysite/images/patterns/pattern_05.png') repeat;
    background-size: 150px;
    opacity: .05;
    -webkit-mask-image: radial-gradient(farthest-side at 100% 0, #000 25%, transparent);
    mask-image: radial-gradient(farthest-side at 100% 0, #000 25%, transparent);
    pointer-events: none;
}

.estc-labs > .estc-container {
    position: relative;
}

.estc-labs__intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: end;
    margin-bottom: 64px;
}

.estc-labs__heading {
    margin: 0;
    font-family: var(--estc-font-heading);
    font-size: 46px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.4px;
    color: var(--estc-heading);
}

.estc-labs__lead p {
    margin: 0 0 22px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--estc-text);
}

.estc-labs__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.estc-labs__facts li {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--estc-border);
    border-top-right-radius: 14px;
    font-size: 14px;
    color: var(--estc-text);
}

.estc-labs__facts strong {
    font-family: var(--estc-font-heading);
    font-size: 17px;
    font-weight: 600;
    color: var(--estc-primary);
}

.estc-labs__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.estc-labs__grid > li {
    display: flex;
}

/* ---- Lab card ---- */
.estc-labcard {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 28px;
    box-shadow: 0 18px 40px -28px rgba(11, 31, 51, .35);
    color: inherit;
    transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
}

.estc-labcard::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: var(--estc-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s ease;
}

.estc-labcard:hover,
.estc-labcard:focus-visible {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 30px 56px -28px rgba(11, 31, 51, .45);
    color: inherit;
}

.estc-labcard:hover::before,
.estc-labcard:focus-visible::before {
    transform: scaleX(1);
}

.estc-labcard__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    padding: 28px;
    background:
        radial-gradient(circle at 50% 120%, rgba(0, 75, 130, .08), transparent 60%),
        #fafbfc;
    border-bottom: 1px solid var(--estc-line);
}

.estc-labcard__logo img {
    max-width: 78%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform .6s ease;
}

.estc-labcard:hover .estc-labcard__logo img {
    transform: scale(1.06);
}

/* Shown when a lab has no logo */
.estc-labcard__monogram {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    height: 116px;
    padding: 0 18px;
    border-radius: 50%;
    background:
        url('../../../mysite/images/patterns/pattern_05.png') repeat,
        var(--estc-primary);
    background-size: 80px, auto;
    background-blend-mode: soft-light;
    font-family: var(--estc-font-heading);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #fff;
}

.estc-labcard__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 24px 26px 26px;
}

.estc-labcard__code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--estc-primary);
}

.estc-labcard__name {
    margin-top: 8px;
    font-family: var(--estc-font-heading);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--estc-heading);
}

.estc-labcard__dir {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--estc-muted);
}

.estc-labcard__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.estc-labcard__stats span {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--estc-primary-light);
    font-size: 13px;
    color: var(--estc-text);
}

.estc-labcard__stats strong {
    color: var(--estc-primary);
}

.estc-labcard__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 22px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--estc-muted);
    transition: color .3s ease;
}

.estc-labcard__more i {
    transition: transform .3s ease;
}

.estc-labcard:hover .estc-labcard__more {
    color: var(--estc-primary);
}

.estc-labcard:hover .estc-labcard__more i {
    transform: translateX(4px);
}

/* ==========================================================================
   Lab page
   ========================================================================== */

.estc-lab-page {
    background: #fbfbfc;
}

/* ---- Header: white profile card pulled up over the page banner ---- */
/* The banner gets extra room at the bottom for the card's overlap */
.page-title.estc-labpage-title {
    padding-bottom: 48px;
}

.estc-labhero {
    position: relative;
    z-index: 2;
}

.estc-labhero__card {
    position: relative;
    margin-top: -48px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 40px;
    box-shadow: 0 30px 60px -36px rgba(11, 31, 51, .45);
}

/* Gold-to-blue rule along the top edge */
.estc-labhero__card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #c9a227 0 120px, var(--estc-primary) 120px);
}

.estc-labhero__grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 56px;
    align-items: center;
    padding: 56px 56px 48px;
}

.estc-labhero__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 28px;
    background:
        radial-gradient(circle at 50% 120%, rgba(0, 75, 130, .08), transparent 60%),
        #fafbfc;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 32px;
}

.estc-labhero__logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.estc-labhero__logo .estc-labcard__monogram {
    min-width: 140px;
    height: 140px;
    font-size: 32px;
}

.estc-labhero__id .estc-labs__eyebrow {
    margin-bottom: 12px;
}

.estc-labhero__code {
    margin: 0;
    font-family: var(--estc-font-heading);
    font-size: 56px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .02em;
    color: var(--estc-primary);
}

.estc-labhero__title {
    max-width: 720px;
    margin: 12px 0 0;
    font-family: var(--estc-font-heading);
    font-size: 28px;
    font-weight: 400;
    line-height: 1.35;
    color: var(--estc-heading);
}

.estc-labhero__dir {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 0;
    padding: 8px 16px;
    border-left: 2px solid #c9a227;
    background: var(--estc-primary-light);
    font-size: 15px;
    color: var(--estc-text);
}

.estc-labhero__dir i {
    color: var(--estc-primary);
}

.estc-labhero__dir strong {
    font-weight: 600;
    color: var(--estc-heading);
}

.estc-labhero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.estc-labhero__actions .estc-btn {
    gap: 10px;
    padding: 12px 22px;
    font-size: 15px;
}

.estc-labhero__actions .estc-labhero__back {
    background: transparent;
    color: var(--estc-primary);
}

.estc-labhero__actions .estc-labhero__back:hover,
.estc-labhero__actions .estc-labhero__back:focus-visible {
    background: var(--estc-primary);
    color: #fff;
}

/* Key figures: slim navy strip along the card's foot */
.estc-labhero__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 0;
    padding: 0 28px;
    list-style: none;
    background:
        url('../../../mysite/images/patterns/pattern_05.png') repeat,
        var(--estc-secondary);
    background-size: 110px, auto;
    background-blend-mode: soft-light;
}

.estc-labhero__facts li {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 20px 28px;
}

.estc-labhero__facts li + li {
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.estc-labhero__facts strong {
    font-family: var(--estc-font-heading);
    font-size: 32px;
    font-weight: 500;
    line-height: 1;
    color: #fff;
}

.estc-labhero__facts span {
    font-size: 12.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
}

/* ---- Lab switcher (under the card) ---- */
.estc-labswitch {
    margin-top: 28px;
    border-bottom: 1px solid var(--estc-line);
}

.estc-labswitch ul {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.estc-labswitch ul::-webkit-scrollbar {
    display: none;
}

.estc-labswitch a {
    position: relative;
    display: block;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .1em;
    white-space: nowrap;
    color: var(--estc-muted);
    transition: color .3s ease;
}

.estc-labswitch a::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 3px;
    background: var(--estc-primary);
    transform: scaleX(0);
    transition: transform .3s ease;
}

.estc-labswitch a:hover,
.estc-labswitch a[aria-current] {
    color: var(--estc-primary);
}

.estc-labswitch a[aria-current]::after,
.estc-labswitch a:hover::after {
    transform: scaleX(1);
}

/* ---- Body: one framed panel, section menu + selected section ---- */
.estc-labbody {
    padding-top: 48px;
    padding-bottom: 112px;
}

.estc-labpanel {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    background: #fff;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 40px;
    box-shadow: 0 30px 60px -40px rgba(11, 31, 51, .4);
}

.estc-labpanel > * {
    min-width: 0;
}

.estc-labtoc[hidden] {
    display: none;
}

/* No sections (lab not filled in yet): the content spans the whole panel */
.estc-labtoc[hidden] + .estc-labbody__main {
    grid-column: 1 / -1;
}

/* Sidebar: tinted column with a faint zellige patch at its foot */
.estc-labtoc {
    position: relative;
    padding: 36px 0 40px 24px;
    background: #f4f7fa;
    border-right: 1px solid var(--estc-line);
}

.estc-labtoc::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background: url('../../../mysite/images/patterns/pattern_05.png') repeat;
    background-size: 120px;
    opacity: .06;
    -webkit-mask-image: linear-gradient(to top, #000, transparent);
    mask-image: linear-gradient(to top, #000, transparent);
    pointer-events: none;
}

.estc-labtoc > * {
    position: relative;
    z-index: 1;
}

.estc-labtoc__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 24px 18px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--estc-muted);
}

.estc-labtoc__title::before {
    content: '';
    width: 22px;
    height: 2px;
    background: #c9a227;
}

.estc-labtoc ol {
    position: sticky;
    top: calc(var(--estc-header-h-compact) + 24px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Items: the active one turns white and joins the content side, like a tab */
.estc-labtoc a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-right: -1px;
    padding: 13px 20px 13px 16px;
    border: 1px solid transparent;
    border-right: 0;
    border-radius: 12px 0 0 12px;
    font-size: 15px;
    color: var(--estc-text);
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.estc-labtoc a i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    color: var(--estc-primary);
    box-shadow: 0 4px 10px -6px rgba(11, 31, 51, .35);
    transition: background-color .3s ease, color .3s ease;
}

.estc-labtoc a span {
    flex: 1;
    line-height: 1.35;
}

.estc-labtoc a em {
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(0, 75, 130, .08);
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    color: var(--estc-primary);
}

.estc-labtoc a:hover,
.estc-labtoc a:focus-visible {
    background: rgba(255, 255, 255, .7);
    color: var(--estc-primary);
}

.estc-labtoc a.is-active {
    border-color: var(--estc-line);
    background: #fff;
    font-weight: 600;
    color: var(--estc-primary);
}

.estc-labtoc a.is-active::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 3px;
    background: var(--estc-primary);
}

.estc-labtoc a.is-active i {
    background: var(--estc-primary);
    color: #fff;
}

/* Content side */
.estc-labbody__main {
    padding: 44px 52px 56px;
    scroll-margin-top: calc(var(--estc-header-h-compact) + 24px);
}

.estc-labsec {
    scroll-margin-top: calc(var(--estc-header-h-compact) + 24px);
}

.estc-labsec + .estc-labsec {
    margin-top: 56px;
    padding-top: 48px;
    border-top: 1px solid var(--estc-line);
}

/* Tab mode (set by the page script): one section at a time, no separators */
.is-tabbed .estc-labsec + .estc-labsec {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.is-tabbed .estc-labsec:not([hidden]) {
    animation: estc-labsec-in .35s ease;
}

@keyframes estc-labsec-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* Tiles inside the white panel get a soft fill so they still read as cards */
.estc-labpanel .estc-team,
.estc-labpanel .estc-axe,
.estc-labpanel .estc-prose--cards ul > li,
.estc-labpanel .estc-prose--cards ol > li {
    background: #fafbfc;
}

.estc-labpanel .estc-labsec__empty {
    margin: 0;
    border: 0;
    background: none;
}

.estc-labsec__title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
    font-family: var(--estc-font-heading);
    font-size: 32px;
    font-weight: 500;
    line-height: 1.2;
    color: var(--estc-heading);
}

.estc-labsec__title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 50%;
    background: var(--estc-primary-light);
    font-size: 18px;
    color: var(--estc-primary);
}

.estc-labsec__sub {
    margin: 32px 0 14px;
    font-family: var(--estc-font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--estc-primary);
}

.estc-labsec__sub:first-of-type {
    margin-top: 0;
}

.estc-labsec__hint {
    margin: -14px 0 22px;
    color: var(--estc-muted);
}

.estc-labsec__empty {
    padding: 40px;
    background: #fff;
    border: 1px dashed var(--estc-border);
    text-align: center;
    color: var(--estc-muted);
}

/* ---- Rich text from the admin ---- */
.estc-prose {
    font-size: 16.5px;
    line-height: 1.85;
    color: var(--estc-text);
}

.estc-prose p,
.estc-prose ul,
.estc-prose ol {
    margin: 0 0 16px;
}

.estc-prose p:empty,
.estc-prose h4:empty {
    display: none;
}

.estc-prose h4 {
    margin: 28px 0 12px;
    font-family: var(--estc-font-body);
    font-size: 15px;
    font-weight: 700;
    color: var(--estc-heading);
}

.estc-prose b,
.estc-prose strong {
    color: var(--estc-heading);
}

.estc-prose ul {
    padding: 0;
    list-style: none;
}

.estc-prose ul > li {
    position: relative;
    padding-left: 26px;
}

.estc-prose ul > li + li {
    margin-top: 8px;
}

.estc-prose ul > li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: .72em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #c9a227;
    transform: rotate(45deg);
}

.estc-prose ol {
    padding-left: 22px;
}

.estc-prose ol > li + li {
    margin-top: 10px;
}

.estc-prose ol > li::marker {
    font-weight: 700;
    color: var(--estc-primary);
}

.estc-prose a {
    color: var(--estc-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    word-break: break-word;
}

/* Short lists (teams, axes) become a grid of tiles */
.estc-prose--cards ul,
.estc-prose--cards ol {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    padding: 0;
    list-style: none;
    counter-reset: tile;
}

.estc-prose--cards ul > li,
.estc-prose--cards ol > li {
    position: relative;
    margin: 0;
    padding: 20px 22px 20px 64px;
    background: #fff;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 18px;
    line-height: 1.6;
    counter-increment: tile;
}

.estc-prose--cards ul > li + li,
.estc-prose--cards ol > li + li {
    margin-top: 0;
}

.estc-prose--cards ul > li::before,
.estc-prose--cards ol > li::before {
    content: counter(tile, decimal-leading-zero);
    position: absolute;
    left: 20px;
    top: 19px;
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    transform: none;
    font-family: var(--estc-font-heading);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--estc-primary);
}

/* Long reference lists: one entry per row */
.estc-prose--refs {
    font-size: 15px;
    line-height: 1.7;
}

.estc-prose--refs ul > li {
    margin: 0;
    padding: 14px 4px 14px 30px;
    border-bottom: 1px solid var(--estc-line);
}

.estc-prose--refs ul > li + li {
    margin-top: 0;
}

.estc-prose--refs ul > li::before {
    top: 1.45em;
    width: 6px;
    height: 6px;
}

/* ---- Research teams ---- */
.estc-teams {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.estc-team {
    position: relative;
    padding: 24px 24px 20px;
    background: #fff;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 22px;
    transition: border-color .3s ease, box-shadow .3s ease;
}

.estc-team:hover {
    border-color: rgba(0, 75, 130, .25);
    box-shadow: 0 18px 36px -26px rgba(11, 31, 51, .4);
}

.estc-team__num {
    font-family: var(--estc-font-heading);
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    color: var(--estc-primary);
}

.estc-team__name {
    margin: 12px 0 0;
    font-family: var(--estc-font-body);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--estc-heading);
}

.estc-team__members {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--estc-line);
}

.estc-team__members summary,
.estc-axe summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
}

.estc-team__members summary::-webkit-details-marker,
.estc-axe summary::-webkit-details-marker {
    display: none;
}

.estc-team__members summary {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--estc-muted);
}

.estc-team__members summary::after,
.estc-axe summary::after {
    content: '\f078';
    margin-left: auto;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 11px;
    transition: transform .3s ease;
}

.estc-team__members[open] summary::after,
.estc-axe[open] summary::after {
    transform: rotate(180deg);
}

.estc-team__members summary:hover {
    color: var(--estc-primary);
}

.estc-team__members ul {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14.5px;
    line-height: 1.5;
}

.estc-team__members li {
    padding: 6px 0;
    color: var(--estc-text);
}

.estc-team__members li + li {
    border-top: 1px dashed var(--estc-line);
}

/* ---- Name lists (members, doctoral students) ---- */
.estc-names {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.estc-names li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--estc-line);
    font-size: 15px;
    color: var(--estc-heading);
}

.estc-names li::before {
    content: '\f007';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 11px;
    color: #c9a227;
}

.estc-names small {
    flex-basis: 100%;
    font-size: 13px;
    color: var(--estc-muted);
}

.estc-names a {
    color: var(--estc-primary);
}

.estc-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--estc-primary-light);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--estc-primary);
}

/* ---- Doctoral students grouped by axis ---- */
.estc-axes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.estc-axe {
    background: #fff;
    border: 1px solid var(--estc-line);
    transition: border-color .3s ease;
}

.estc-axe[open] {
    border-color: rgba(0, 75, 130, .25);
    border-left: 3px solid var(--estc-primary);
}

.estc-axe summary {
    padding: 18px 22px;
    font-size: 16px;
    font-weight: 600;
    color: var(--estc-heading);
}

.estc-axe summary:hover {
    color: var(--estc-primary);
}

.estc-axe__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--estc-primary-light);
    font-size: 12.5px;
    color: var(--estc-primary);
}

.estc-axe .estc-names {
    padding: 0 22px 18px;
}

/* ---- Production scientifique tabs ---- */
.estc-pubtabs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.estc-pubtabs__list button {
    padding: 10px 16px;
    border: 1px solid var(--estc-border);
    border-radius: 999px;
    background: #fff;
    font-family: var(--estc-font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--estc-text);
    cursor: pointer;
    transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}

.estc-pubtabs__list button:hover {
    border-color: var(--estc-primary);
    color: var(--estc-primary);
}

.estc-pubtabs__list button[aria-selected="true"] {
    border-color: var(--estc-primary);
    background: var(--estc-primary);
    color: #fff;
}

.estc-pubtabs__panel {
    max-height: 720px;
    overflow-y: auto;
    padding: 8px 28px 8px 24px;
    background: #fff;
    border: 1px solid var(--estc-line);
    border-bottom-right-radius: 24px;
    overscroll-behavior: contain;
}

.estc-pubtabs__panel:focus-visible {
    outline: 2px solid var(--estc-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .estc-labs__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .estc-labpanel {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .estc-labbody__main {
        padding: 36px 36px 48px;
    }

    .estc-labhero__grid {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 40px;
        padding: 44px 40px 40px;
    }
}

@media (max-width: 860px) {
    .estc-labs {
        padding: 56px 0 72px;
    }

    .estc-labs__intro {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 40px;
    }

    .estc-labs__heading {
        font-size: 34px;
    }

    .page-title.estc-labpage-title {
        padding-bottom: 32px;
    }

    .estc-labhero__card {
        margin-top: -32px;
        border-bottom-right-radius: 28px;
    }

    .estc-labhero__grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 22px 28px;
    }

    .estc-labhero__logo {
        width: 140px;
        padding: 16px;
        border-bottom-right-radius: 22px;
    }

    .estc-labhero__logo .estc-labcard__monogram {
        min-width: 92px;
        height: 92px;
        font-size: 22px;
    }

    .estc-labhero__code {
        font-size: 42px;
    }

    .estc-labhero__title {
        font-size: 22px;
    }

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

    .estc-labhero__facts li {
        flex-direction: column;
        gap: 6px;
        padding: 18px 22px;
    }

    .estc-labhero__facts li:nth-child(odd) {
        border-left: 0;
    }

    .estc-labhero__facts li:nth-child(n + 3) {
        border-top: 1px solid rgba(255, 255, 255, .14);
    }

    .estc-labbody {
        padding-top: 32px;
        padding-bottom: 72px;
    }

    .estc-labpanel {
        grid-template-columns: minmax(0, 1fr);
        border-bottom-right-radius: 28px;
    }

    /* The section menu becomes a grid of buttons above the panel: every section stays visible */
    .estc-labtoc {
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--estc-line);
    }

    .estc-labtoc::after,
    .estc-labtoc__title {
        display: none;
    }

    .estc-labtoc ol {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 0;
    }

    .estc-labtoc a {
        gap: 8px;
        height: 100%;
        margin: 0;
        padding: 8px 10px;
        border: 1px solid var(--estc-line);
        border-radius: 12px;
        background: #fff;
        font-size: 13.5px;
    }

    .estc-labtoc a i {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border-radius: 8px;
    }

    .estc-labtoc a.is-active {
        border-color: currentColor;
    }

    .estc-labtoc a.is-active::before {
        display: none;
    }

    .estc-labbody__main {
        padding: 28px 18px 36px;
    }

    .estc-labsec__title {
        font-size: 26px;
    }

    .estc-labsec + .estc-labsec {
        margin-top: 48px;
        padding-top: 40px;
    }

    .estc-pubtabs__list {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-right: -16px;
        padding-right: 16px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .estc-pubtabs__list button {
        flex: none;
    }

    .estc-pubtabs__panel {
        max-height: 560px;
        padding: 4px 16px 4px 12px;
    }
}

@media (max-width: 640px) {
    .estc-labs__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .estc-labcard__logo {
        height: 150px;
    }

    .estc-labhero__actions .estc-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .estc-labhero__facts strong {
        font-size: 28px;
    }

    .estc-prose--cards ul,
    .estc-prose--cards ol {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .estc-labcard,
    .estc-labcard::before,
    .estc-labcard__logo img,
    .estc-labcard__more i {
        transition: none;
    }

    .estc-labcard:hover {
        transform: none;
    }

    .is-tabbed .estc-labsec:not([hidden]) {
        animation: none;
    }
}
