/* Hallmark · pre-emit critique: P4 H5 E4 S5 R5 V4 */
/* Hallmark · genre: editorial · macrostructure: clinical profile · theme: IEC institutional calm · enrichment: physician portraits */
:root {
    --bio-paper: #f5f7fa;
    --bio-surface: #ffffff;
    --bio-ink: #12234c;
    --bio-text: #1f2937;
    --bio-muted: #5d6472;
    --bio-rule: rgba(18,35,76,0.14);
    --bio-rule-soft: rgba(18,35,76,0.08);
    --bio-shadow: 0 18px 45px rgba(18,35,76,0.08);
    --bio-radius: 18px;
    --bio-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html,
body {
    overflow-x: clip;
}

body {
    min-height: 100svh;
    background: var(--bio-paper);
    color: var(--bio-text);
}

.topbar {
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--bio-rule-soft);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.topbar-inner {
    max-width: 1120px;
    padding: 14px 22px;
}

.logo img {
    height: clamp(48px, 4.8vw, 62px);
}

.back-link {
    gap: 8px;
    min-height: 42px;
    padding: 10px 17px;
    border: 1px solid rgba(18,35,76,0.42);
    background: #fff;
    color: var(--bio-ink);
    white-space: nowrap;
    transition:
        background 180ms var(--bio-ease-out),
        border-color 180ms var(--bio-ease-out),
        transform 180ms var(--bio-ease-out);
}

.back-link::after {
    content: "›";
    font-size: 1.08rem;
    line-height: 1;
    transform: translateY(-1px);
}

.back-link:hover,
.back-link:focus-visible {
    background: #f8fafc;
    border-color: var(--bio-ink);
    color: var(--bio-ink);
    transform: translateY(-1px);
}

.back-link:focus-visible {
    outline: 3px solid rgba(18,35,76,0.22);
    outline-offset: 3px;
}

main {
    max-width: 1120px;
    padding: clamp(34px, 5vw, 64px) clamp(18px, 4vw, 28px) clamp(60px, 8vw, 94px);
}

.profile {
    display: grid !important;
    grid-template-columns: minmax(250px, 0.52fr) minmax(0, 1fr) !important;
    gap: clamp(28px, 4.6vw, 56px);
    align-items: start !important;
    position: relative;
    padding: clamp(24px, 4vw, 46px);
    border: 1px solid var(--bio-rule);
    border-radius: var(--bio-radius);
    background: var(--bio-surface);
    box-shadow: var(--bio-shadow);
}

.profile::before {
    content: none;
}

.profile-heading {
    grid-column: 2;
    max-width: 760px;
    min-width: 0;
    display: grid;
    gap: 10px;
    align-self: start;
    text-align: left;
}

.profile-heading::after {
    content: "";
    width: min(100%, 520px);
    height: 1px;
    margin-top: 10px;
    background: var(--bio-rule-soft);
}

.eyebrow {
    width: fit-content;
    margin: 0 !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--bio-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

h1 {
    max-width: 100%;
    margin: 0 !important;
    color: var(--bio-ink);
    font-size: clamp(2rem, 3.7vw, 3.45rem);
    line-height: 1.06;
    letter-spacing: 0;
    text-align: left;
    overflow-wrap: anywhere;
    white-space: normal !important;
}

.portrait,
.placeholder {
    grid-row: 1 / span 2;
    width: 100% !important;
    max-width: 360px !important;
    min-width: 0;
    min-height: 0;
    height: auto !important;
    margin: 0 !important;
    align-self: start;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--bio-rule-soft);
    border-radius: 14px;
    box-shadow: none;
}

.portrait {
    background: #f8fafc;
}

.portrait::after,
.placeholder::before {
    content: none;
}

.portrait img {
    width: 100%;
    height: auto !important;
    min-height: 0;
    display: block;
    object-fit: contain;
    object-position: center top;
    border-radius: 0 !important;
}

.placeholder {
    display: grid;
    aspect-ratio: 4 / 5;
    place-items: center;
    background: #eef2f7;
    color: var(--bio-ink);
    font-family: 'Lora', serif;
    font-size: clamp(3.2rem, 8vw, 5rem);
    letter-spacing: 0.02em;
    text-shadow: none;
}

.placeholder::after {
    content: "Portrait à venir";
    position: absolute;
    right: 18px;
    bottom: 18px;
    max-width: calc(100% - 36px);
    padding: 5px 10px;
    border: 1px solid var(--bio-rule);
    border-radius: 999px;
    background: rgba(255,255,255,0.78);
    color: var(--bio-muted);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.bio-card {
    grid-column: 2;
    align-self: start;
    position: relative;
    overflow: visible;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.bio-card::before,
.bio-card::after {
    content: none;
}

.bio-card p {
    position: relative;
    max-width: 72ch;
    margin: 0;
    color: var(--bio-text);
    font-size: clamp(1.02rem, 0.25vw + 0.98rem, 1.12rem);
    line-height: 1.78;
    text-align: left;
    hyphens: auto;
}

.bio-card p:first-child {
    max-width: 60ch;
    color: var(--bio-ink);
    font-family: 'Source Sans 3', sans-serif;
    font-size: clamp(1.08rem, 0.35vw + 1.02rem, 1.22rem);
    font-weight: 700;
    line-height: 1.55;
}

.bio-card p + p {
    margin-top: 18px;
    padding-top: 0;
    border-top: 0;
}

@media (max-width: 920px) {
    main {
        padding-top: 34px;
    }

    .profile {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 22px;
        padding: 22px;
    }

    .profile-heading,
    .portrait,
    .placeholder,
    .bio-card {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        min-width: 0;
    }

    .profile-heading {
        order: 1;
    }

    .portrait,
    .placeholder {
        order: 2;
        max-width: min(100%, 430px) !important;
    }

    .bio-card {
        order: 3;
    }
}

@media (max-width: 560px) {
    .topbar-inner {
        flex-direction: row;
        align-items: center;
        padding: 12px 18px;
    }

    .logo img {
        height: 46px;
    }

    .back-link {
        width: auto;
        min-height: 40px;
        padding: 9px 15px;
    }

    h1 {
        font-size: clamp(1.9rem, 9.5vw, 2.85rem);
    }

    .profile {
        padding: 18px;
        border-radius: 16px;
    }

    .portrait,
    .placeholder {
        max-width: 100% !important;
        border-radius: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .back-link {
        transition-duration: 120ms;
    }
}
