/* ===== Shared Styles — Master Bioinformatique ===== */

@font-face {
    font-family: 'DM Sans';
    src: url('fonts/DMSans-VariableFont_opsz,wght.ttf') format('truetype-variations'),
         url('fonts/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DM Serif Display';
    src: url('fonts/DMSerifDisplay-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---- Base ---- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
}







/* ---- Navbar Logo Switch ---- */
.nav-logo-switch {
    position: relative;
    display: block;
    width: 4rem;
    height: 4rem;
    overflow: visible;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo-switch img {
    position: absolute;
    height: 4rem !important;
    max-width: none !important;
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo-circle {
    inset: 0;
    width: 4rem;
    border-radius: 9999px;
    opacity: 1;
    transform: scale(1);
}

.nav-logo-full {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: auto !important;
    right: auto !important;
    width: auto !important;
    object-fit: contain;
    opacity: 0;
}

/* ---- Hero Stamp Rotation ---- */
.hero-stamp-ring {
    transform-origin: center;
    animation: hero-stamp-rotate 90s linear infinite;
}

@keyframes hero-stamp-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---- Navbar logo expansion (desktop) ---- */
@media (min-width: 768px) {
    .nav-logo-switch.is-expanded {
        width: 14.75rem;
        border-radius: 9999px;
        background: linear-gradient(135deg, rgba(255,255,255,0.68) 0%, rgba(255,255,255,0.38) 100%);
        -webkit-backdrop-filter: blur(52px) saturate(1.35) brightness(1.08);
        backdrop-filter: blur(52px) saturate(1.35) brightness(1.08);
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    .nav-logo-switch.is-expanded .nav-logo-circle {
        opacity: 0;
        transform: scale(0.92);
    }

    .nav-logo-switch.is-expanded .nav-logo-full {
        opacity: 1;
    }
}

@media (min-width: 768px) {
    html.dark .nav-logo-switch.is-expanded {
        background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.07) 100%);
        box-shadow: 0 10px 30px rgba(0,0,0,0.34);
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0s !important;
    }

    .nav-logo-switch,
    .nav-logo-switch img {
        transition: none !important;
    }

    .hero-stamp-ring {
        animation: none !important;
    }
}

/* ---- Mobile menu panel ---- */
.mobile-menu-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
}

.mobile-menu-panel.open {
    max-height: 100vh;
    overflow-y: auto;
    opacity: 1;
}

/* ---- Dark mode overrides ---- */
html.dark body {
    background-color: var(--color-brand-black);
}

html.dark section.bg-white {
    background-color: var(--color-brand-black);
}

html.dark section.bg-gray-light {
    background-color: var(--color-brand-black);
}

html.dark .bg-white.rounded-2xl,
html.dark .bg-white.rounded-2xl {
    background-color: var(--color-dark-card);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark .bg-brand-gray.rounded-2xl,
html.dark .bg-brand-gray.rounded-2xl {
    background-color: var(--color-dark-card);
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark .mobile-menu {
    background-color: var(--color-brand-black);
}

html.dark .text-brand-black {
    color: #FFFFFF;
}



html.dark .border-gray-light {
    border-color: rgba(255, 255, 255, 0.08);
}

html.dark a.text-brand-teal {
    color: var(--color-brand-mint);
}

html.dark a.text-brand-teal:hover {
    color: rgba(15, 209, 167, 0.8);
}

/* ---- Mobile expandable sections ---- */
.mobile-expandable {
    max-height: 7.5em;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
}

.mobile-expandable.expanded {
    max-height: 20000px !important;
}

.mobile-expandable:not(.expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8em;
    background: linear-gradient(transparent, var(--fade-bg, #ffffff));
    pointer-events: none;
}

html.dark .mobile-expandable:not(.expanded)::after {
    background: linear-gradient(transparent, var(--fade-bg-dark, var(--color-brand-black)));
}

.mobile-expandable.fade-teal:not(.expanded)::after {
    background: linear-gradient(transparent, #006C67);
}

html.dark .mobile-expandable.fade-teal:not(.expanded)::after {
    background: linear-gradient(transparent, #006C67);
}

.mobile-expandable.fade-dark:not(.expanded)::after {
    background: linear-gradient(transparent, var(--color-brand-black));
}

html.dark .mobile-expandable.fade-dark:not(.expanded)::after {
    background: linear-gradient(transparent, var(--color-brand-black));
}

.mobile-expandable.fade-gray:not(.expanded)::after {
    background: linear-gradient(transparent, #F3F4F5);
}

html.dark .mobile-expandable.fade-gray:not(.expanded)::after {
    background: linear-gradient(transparent, var(--color-brand-black));
}

/* ---- "Voir plus" buttons ---- */
.voir-plus-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-top: 1.5em;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0.25em 0;
    transition: color 0.2s;
}

.voir-plus-btn i {
    transition: transform 0.3s;
    font-size: 0.7em;
}

.voir-plus-btn.active i {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    .mobile-expandable {
        max-height: none !important;
        overflow: visible !important;
    }

    .mobile-expandable::after {
        display: none !important;
    }

    .voir-plus-btn {
        display: none !important;
    }

    .mobile-hidden-extra {
        display: block !important;
    }
}

/* ---- Mobile Accordions ---- */
.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-accordion-content.expanded {
    max-height: 2000px;
}

.accordion-trigger {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}

.accordion-trigger:hover {
    opacity: 0.8;
}

.accordion-trigger svg {
    transition: transform 0.3s;
}

.accordion-trigger.expanded svg {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    .mobile-accordion-content {
        max-height: none !important;
        overflow: visible !important;
    }

    .accordion-trigger {
        cursor: default;
        pointer-events: none;
    }

    .accordion-trigger svg {
        display: none;
    }

    .accordion-trigger:hover {
        opacity: 1;
    }
}

/* ---- Liquid Glass Effect ---- */
.liquid-glass {
    background: linear-gradient(135deg, rgba(255,255,255,0.68) 0%, rgba(255,255,255,0.38) 100%);
    -webkit-backdrop-filter: blur(52px) saturate(1.35) brightness(1.08);
    backdrop-filter: blur(52px) saturate(1.35) brightness(1.08);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

html.dark .liquid-glass {
    background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.07) 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.34);
}

.liquid-glass-dark {
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
    -webkit-backdrop-filter: blur(40px) saturate(1.6) brightness(1.05);
    backdrop-filter: blur(40px) saturate(1.6) brightness(1.05);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.20),
        inset 0 1px 0 rgba(255,255,255,0.15),
        inset 0 -1px 0 rgba(255,255,255,0.05);
}

/* ---- Page header (inner pages) ---- */
.page-header {
    padding-top: 7rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .page-header {
        padding-top: 8rem;
        padding-bottom: 4rem;
    }
}
