/**
 * OOI Platform V1 — Workspace Hero opérationnel.
 */

.ooi-workspace-hero {
    --workspace-taupe: #d8cfc3;
    --workspace-taupe-soft: #e9e2d9;
    --workspace-ivory: #f7f3ed;
    --workspace-paper: #fffdf9;
    --workspace-ink: #10213a;
    --workspace-muted: #687383;
    position: relative;
    width: 100%;
    padding: clamp(26px, 3.3vw, 48px);
    overflow: hidden;
    border: 1px solid rgba(112, 96, 81, .18);
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 8%, rgba(128, 197, 207, .17), transparent 29%),
        linear-gradient(135deg, var(--workspace-ivory), #eee7de 72%, var(--workspace-taupe));
    box-shadow: 0 16px 42px rgba(60, 50, 40, .08);
    color: var(--workspace-ink);
}

.ooi-workspace-hero--ready {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    gap: clamp(30px, 4.8vw, 70px);
    align-items: center;
}

.ooi-workspace-hero__main,
.ooi-workspace-hero__aside,
.ooi-workspace-hero__moment-content {
    min-width: 0;
}

.ooi-workspace-hero__welcome {
    display: flex;
    gap: clamp(18px, 3vw, 30px);
    align-items: center;
}

.ooi-workspace-hero__portrait {
    position: relative;
    display: flex;
    width: clamp(78px, 8vw, 112px);
    height: clamp(78px, 8vw, 112px);
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 5px;
    overflow: visible;
    border: 0;
    border-radius: 50%;
    background:
        conic-gradient(
            #80c5cf 0 var(--ooi-profile-progress, 0%),
            rgba(114, 112, 172, .18) var(--ooi-profile-progress, 0%) 100%
        );
    box-shadow: 0 8px 24px rgba(60, 50, 40, .13);
    color: #ffffff;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ooi-workspace-hero__portrait::after {
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(128, 197, 207, .32);
    border-radius: inherit;
    content: "";
    opacity: .72;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
}

.ooi-workspace-hero__portrait:hover::after,
.ooi-workspace-hero__portrait:focus-visible::after {
    transform: scale(1.05);
    opacity: 1;
}

.ooi-workspace-hero__portrait--unlinked {
    background: rgba(114, 112, 172, .16);
}

.ooi-workspace-hero__portrait:hover,
.ooi-workspace-hero__portrait:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(60, 50, 40, .18);
}

.ooi-workspace-hero__portrait-image,
.ooi-workspace-hero__portrait-initial {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid var(--workspace-paper);
    border-radius: 50%;
}

.ooi-workspace-hero__portrait-image {
    object-fit: cover;
}

.ooi-workspace-hero__portrait-initial {
    font-size: 28px;
    font-weight: 850;
}

.ooi-workspace-hero__eyebrow,
.ooi-workspace-hero__moment-eyebrow {
    display: block;
    color: #7270ac;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ooi-workspace-hero__title {
    margin: 10px 0 0;
    color: var(--workspace-ink);
    font-size: clamp(38px, 4.4vw, 62px);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.035em;
}

.ooi-workspace-hero__description {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--workspace-muted);
    font-size: clamp(16px, 1.5vw, 21px);
    line-height: 1.55;
}

.ooi-workspace-hero__tasks {
    max-width: 640px;
    margin-top: clamp(22px, 2.8vw, 34px);
}

.ooi-workspace-hero__tasks-title {
    margin: 0;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(112, 96, 81, .18);
    color: var(--workspace-ink);
    font-size: 20px;
    font-weight: 750;
}

.ooi-workspace-hero__task-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ooi-workspace-hero__task {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 17px 0;
    border-bottom: 1px solid rgba(112, 96, 81, .14);
}

.ooi-workspace-hero__task-dot {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #80c5cf;
    box-shadow: 0 0 0 6px rgba(128, 197, 207, .13);
}

.ooi-workspace-hero__task a {
    color: var(--workspace-ink);
    font-size: 17px;
    font-weight: 750;
    text-decoration: none;
}

.ooi-workspace-hero__task a:hover,
.ooi-workspace-hero__task a:focus-visible {
    color: #7270ac;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ooi-workspace-hero__task span:not(.ooi-workspace-hero__task-dot) {
    display: block;
    margin-top: 4px;
    color: var(--workspace-muted);
    font-size: 14px;
}

.ooi-workspace-hero__empty-task {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    margin: 0;
    padding: 9px 14px;
    border: 1px solid rgba(170, 207, 128, .34);
    border-radius: 999px;
    background: rgba(170, 207, 128, .12);
    color: #526b37;
    font-size: 14px;
    font-weight: 700;
}

.ooi-workspace-hero__empty-task > span {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(170, 207, 128, .26);
    font-weight: 900;
}

.ooi-workspace-hero__onboarding {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
    padding: 18px;
    border: 1px solid rgba(255, 171, 78, .34);
    border-radius: 18px;
    background: rgba(255, 253, 249, .76);
}

.ooi-workspace-hero__onboarding-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(255, 171, 78, .2);
    color: #8b5519;
    font-size: 13px;
    font-weight: 900;
}

.ooi-workspace-hero__onboarding-content strong {
    color: var(--workspace-ink);
    font-size: 18px;
}

.ooi-workspace-hero__onboarding-content p {
    margin: 7px 0 0;
    color: var(--workspace-muted);
    font-size: 14px;
    line-height: 1.5;
}

.ooi-workspace-hero__onboarding-content a {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 13px;
    color: #665fa5;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.ooi-workspace-hero__onboarding-content a:hover,
.ooi-workspace-hero__onboarding-content a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ooi-workspace-hero__shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.ooi-workspace-hero__shortcut {
    display: inline-flex;
    min-height: 42px;
    gap: 9px;
    align-items: center;
    padding: 8px 14px 8px 9px;
    border: 1px solid rgba(112, 96, 81, .18);
    border-radius: 999px;
    background: rgba(255, 253, 249, .72);
    color: var(--workspace-ink);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.ooi-workspace-hero__shortcut:hover,
.ooi-workspace-hero__shortcut:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(114, 112, 172, .42);
    background: var(--workspace-paper);
}

.ooi-workspace-hero__shortcut-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--workspace-taupe-soft);
    color: #665fa5;
    font-size: 12px;
    font-weight: 900;
}

.ooi-workspace-hero__shortcut--provider .ooi-workspace-hero__shortcut-icon {
    background: rgba(255, 171, 78, .2);
    color: #9c5b10;
}

.ooi-workspace-hero__moment {
    display: grid;
    grid-template-columns: minmax(140px, .85fr) minmax(170px, 1fr);
    gap: clamp(20px, 3vw, 34px);
    align-items: center;
    padding: clamp(16px, 2vw, 24px);
    border: 1px solid rgba(112, 96, 81, .18);
    border-radius: 22px;
    background: rgba(255, 253, 249, .82);
    box-shadow: 0 10px 30px rgba(60, 50, 40, .07);
    backdrop-filter: blur(8px);
}

.ooi-workspace-hero__moment-visual {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 17px;
    background: var(--workspace-taupe-soft);
}

.ooi-workspace-hero__moment-image,
.ooi-workspace-hero__moment-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.ooi-workspace-hero__moment-image {
    object-fit: cover;
}

.ooi-workspace-hero__moment-placeholder {
    background: linear-gradient(145deg, #d8cfc3, #80c5cf);
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
}

.ooi-workspace-hero__moment-title {
    margin: 13px 0 20px;
    color: var(--workspace-ink);
    font-size: clamp(22px, 2.2vw, 33px);
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.ooi-workspace-hero__moment-meta {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 9px 0 0;
    color: #425169;
    font-size: 14px;
    line-height: 1.4;
}

.ooi-workspace-hero__moment-meta > span {
    color: #7270ac;
    font-size: 18px;
}

.ooi-workspace-hero__moment-link {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    margin-top: 24px;
    color: #665fa5;
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
}

.ooi-workspace-hero__moment-link:hover,
.ooi-workspace-hero__moment-link:focus-visible {
    color: #10213a;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ooi-workspace-hero--guest {
    display: block;
    max-width: 900px;
}

.ooi-workspace-hero__guest-content {
    max-width: 650px;
}

.ooi-workspace-hero__button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #7270ac;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

/* Personal actions: one primary button, quieter links, always visible labels. */
.ooi-workspace-hero__personal-actions {
    align-items: center;
    gap: 10px 16px;
}

.ooi-workspace-hero__personal-actions > .ooi-workspace-hero__button {
    box-sizing: border-box;
    min-height: 44px;
    gap: 8px;
    margin: 0;
    border: 1px solid #665fa5;
    background: #665fa5;
    color: #fff;
    cursor: pointer;
}

.ooi-workspace-hero__personal-actions > .ooi-workspace-hero__shortcut {
    box-sizing: border-box;
    min-height: 44px;
    gap: 8px;
    padding: 8px;
    border-color: transparent;
    border-radius: 8px;
    background: transparent;
    color: #45435f;
}

.ooi-workspace-hero__personal-actions .ooi-workspace-hero__shortcut-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
}

.ooi-workspace-hero__personal-actions > :hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ooi-workspace-hero__personal-actions > :focus-visible,
.ooi-workspace__edit-information:focus-visible {
    outline: 3px solid #665fa5;
    outline-offset: 3px;
}

.ooi-workspace__edit-information {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 12px;
    color: #665fa5;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 4px;
}

@media (max-width: 620px) {
    .ooi-workspace-hero__personal-actions {
        gap: 8px;
    }

    .ooi-workspace-hero__personal-actions > .ooi-workspace-hero__button {
        flex-basis: 100%;
    }
}

@media (max-width: 960px) {
    .ooi-workspace-hero--ready {
        grid-template-columns: 1fr;
    }

    .ooi-workspace-hero__aside {
        max-width: 680px;
    }
}

@media (max-width: 620px) {
    .ooi-workspace-hero {
        padding: 24px 20px;
        border-radius: 18px;
    }

    .ooi-workspace-hero__title {
        font-size: clamp(34px, 10.8vw, 46px);
    }

    .ooi-workspace-hero__description {
        font-size: 16px;
    }

    .ooi-workspace-hero__welcome {
        align-items: flex-start;
    }

    .ooi-workspace-hero__portrait {
        width: 68px;
        height: 68px;
    }

    .ooi-workspace-hero__shortcuts {
        display: flex;
    }

    .ooi-workspace-hero__shortcut {
        width: auto;
    }

    .ooi-workspace-hero__onboarding {
        grid-template-columns: 1fr;
    }

    .ooi-workspace-hero__moment {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 17px;
        padding: 15px;
        border-radius: 17px;
    }

    .ooi-workspace-hero__moment-title {
        margin: 8px 0 12px;
        font-size: 20px;
    }

    .ooi-workspace-hero__moment-meta {
        font-size: 12px;
    }

    .ooi-workspace-hero__moment-link {
        margin-top: 14px;
        font-size: 13px;
    }
}

@media (max-width: 430px) {
    .ooi-workspace-hero__moment {
        grid-template-columns: 104px minmax(0, 1fr);
    }

    .ooi-workspace-hero__moment-visual {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ooi-workspace-hero * {
        scroll-behavior: auto;
    }
}
