/* Accueil enseignant de l’espace local. Tous les styles restent dans cette vue. */
.workspace-home {
    --ws-ink: #302b3b;
    --ws-muted: #625d6c;
    --ws-paper: #fbf9f5;
    --ws-surface: #fffefa;
    --ws-line: #e7e0e8;
    --ws-lavender: #eee8f6;
    --ws-lavender-ink: #55466e;
    --ws-green: #e8f1e8;
    --ws-green-ink: #365b46;
    --ws-focus: #72549a;
    box-sizing: border-box;
    width: min(100%, 1440px);
    margin-inline: auto;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    color: var(--ws-ink);
    background: var(--ws-paper);
    font-family: inherit;
}

.workspace-home *,
.workspace-home *::before,
.workspace-home *::after {
    box-sizing: border-box;
}

.workspace-home [hidden] {
    display: none !important;
}

.workspace-home :focus-visible {
    outline: 3px solid var(--ws-focus);
    outline-offset: 3px;
}

.workspace-home .workspace-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 142px;
    margin: 0 0 0.8rem;
    padding: 1rem clamp(1rem, 2.4vw, 2rem);
    overflow: hidden;
    border: 1px solid #e8e1ec;
    border-radius: 22px;
    background:
        radial-gradient(ellipse at 88% 14%, #f2edf8 0, #f2edf800 38%),
        linear-gradient(112deg, #fffefa 0%, #faf7f2 65%, #f5f1f8 100%);
    box-shadow: 0 8px 24px #33263d0a;
}

.workspace-home .workspace-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.workspace-home .workspace-eyebrow {
    display: block;
    margin: 0 0 0.3rem;
    color: #6a5a7b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.25;
    text-transform: uppercase;
}

.workspace-home #workspace-title {
    margin: 0;
    color: #332b3e;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 760;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.workspace-home .workspace-hero-intro {
    max-width: 62ch;
    margin: 0.45rem 0 0;
    color: var(--ws-muted);
    font-size: 0.96rem;
    line-height: 1.45;
}

.workspace-home .workspace-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin-top: 0.55rem;
    color: #4c6757;
    font-size: 0.76rem;
    font-weight: 650;
}

.workspace-home .workspace-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.workspace-home .workspace-trust span::before {
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: #78a087;
    content: '';
}

.workspace-home .workspace-hero-plume {
    display: grid;
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    place-items: center;
}

.workspace-home .workspace-hero-plume picture,
.workspace-home .workspace-hero-plume img.plume {
    display: block;
    width: 120px;
    height: 120px;
}

.workspace-home .workspace-hero-plume img.plume {
    object-fit: contain;
    filter: drop-shadow(0 8px 8px #49375b20);
}

.workspace-home .workspace-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0 0 0.65rem;
}

.workspace-home .workspace-choice {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    min-height: 156px;
    padding: 1rem;
    border: 1px solid var(--ws-line);
    border-radius: 18px;
    background: var(--ws-surface);
    color: var(--ws-ink);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 5px 16px #33263d08;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.workspace-home .workspace-choice:hover {
    transform: translateY(-2px);
    border-color: #d3c5de;
    box-shadow: 0 10px 22px #33263d12;
}

.workspace-home .workspace-choice:active {
    transform: translateY(0);
}

.workspace-home .workspace-choice-icon {
    display: grid;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    place-items: center;
    background: var(--ws-lavender);
    color: var(--ws-lavender-ink);
    font-size: 1.35rem;
}

.workspace-home .workspace-choice--project .workspace-choice-icon {
    background: #edf0f8;
    color: #4f5c79;
}

.workspace-home .workspace-choice--documents .workspace-choice-icon {
    background: var(--ws-green);
    color: var(--ws-green-ink);
}

.workspace-home .workspace-choice-copy {
    display: grid;
    min-width: 0;
    gap: 0.18rem;
}

.workspace-home .workspace-choice-kicker {
    color: #776c80;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.workspace-home .workspace-choice strong {
    color: #342b40;
    font-size: clamp(1.05rem, 1.5vw, 1.26rem);
    font-weight: 760;
    line-height: 1.2;
}

.workspace-home .workspace-choice-description {
    color: var(--ws-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.workspace-home .workspace-choice-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 24px;
    margin-top: 0.12rem;
    color: #5e4b78;
    font-size: 0.79rem;
    font-weight: 750;
}

.workspace-home .workspace-choice-cta::after {
    content: '→';
    font-size: 1rem;
    transition: transform 160ms ease;
}

.workspace-home .workspace-choice:hover .workspace-choice-cta::after {
    transform: translateX(3px);
}

.workspace-home .workspace-session-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    flex-wrap: wrap;
    margin: 0 0 0.8rem;
}

.workspace-home .local-workspace-status {
    flex: 1 1 220px;
    margin: 0;
    padding: 0.4rem 0.7rem;
    border: 1px solid #e2e9df;
    border-radius: 999px;
    background: #f1f6ee;
    color: #3f604a;
    font-size: 0.79rem;
    line-height: 1.35;
}

.workspace-home .workspace-session-line button {
    min-width: 44px;
    min-height: 44px;
    padding: 0.55rem 0.8rem;
    border: 1px solid #ddd5e4;
    border-radius: 12px;
    background: #fffefa;
    color: #514663;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.workspace-home .workspace-session-line button:hover {
    background: #f4eff8;
}

.workspace-home .local-workspace-today {
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e3e5d9;
    border-radius: 16px;
    background: #f7f8f0;
}

.workspace-home .local-workspace-today-heading h2,
.workspace-home .local-workspace-today h3 {
    color: #3b4c40;
}

.workspace-home .workspace-catalogue-heading {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin: 1.2rem 0 0.65rem;
}

.workspace-home .workspace-catalogue-heading h2 {
    margin: 0;
    color: #393244;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    letter-spacing: -0.02em;
}

.workspace-home #workspace-toggle-tools {
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    border: 1px solid #ddd5e4;
    border-radius: 12px;
    background: #fffefa;
    color: #514663;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.workspace-home #workspace-toggle-tools:hover {
    background: #f4eff8;
}

.workspace-home .workspace-search-label-text {
    color: var(--ws-ink);
}

.workspace-home .local-workspace-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    align-items: start;
    gap: 0.7rem;
}

.workspace-home .local-workspace-search {
    display: grid;
    grid-column: 1 / -1;
    gap: 0.38rem;
    padding: 0.2rem 0;
    color: var(--ws-ink);
    font-size: 0.88rem;
    font-weight: 700;
}

.workspace-home .local-workspace-search > span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.workspace-home #workspace-search {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d6ccdc;
    border-radius: 12px;
    background: #fffefa;
    color: #302b3b;
    font: inherit;
}

.workspace-home #workspace-search::placeholder {
    color: #716b78;
    opacity: 1;
}

.workspace-home .workspace-search-status {
    grid-column: 1 / -1;
    margin: -0.25rem 0 0;
    color: var(--ws-muted);
    font-size: 0.82rem;
}

.workspace-home .local-workspace-tool-group {
    min-width: 0;
    border: 1px solid #e4dfe8;
    border-radius: 14px;
    background: #fffefa;
    box-shadow: 0 3px 12px #33263d07;
}

.workspace-home .local-workspace-tool-group summary {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 48px;
    padding: 0.55rem 0.75rem;
    color: #3c3447;
    font-size: 0.88rem;
    font-weight: 750;
    list-style: none;
    cursor: pointer;
}

.workspace-home .local-workspace-tool-group summary::-webkit-details-marker {
    display: none;
}

.workspace-home .local-workspace-tool-group summary::after {
    flex: 0 0 auto;
    margin-left: auto;
    color: #655579;
    content: '⌄';
    font-size: 1.1rem;
    transition: transform 150ms ease;
}

.workspace-home .local-workspace-tool-group[open] summary::after {
    transform: rotate(180deg);
}

.workspace-home .local-workspace-tool-group summary .compteur,
.workspace-home .local-workspace-tool-group summary > span:last-child {
    padding: 0.14rem 0.48rem;
    border-radius: 999px;
    background: #f0ebf5;
    color: #57486c;
    font-size: 0.72rem;
    font-weight: 750;
}

.workspace-home .local-workspace-tool-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.3rem;
    border-top: 1px solid #eee9f0;
    background: #fdfbf8;
}

.workspace-home .local-workspace-tool-list button,
.workspace-home .local-workspace-tools > button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #393342;
    font: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.workspace-home .local-workspace-tool-list button:hover,
.workspace-home .local-workspace-tools > button:hover {
    background: #f1edf5;
    box-shadow: none;
}

.workspace-home .local-workspace-tool-list i,
.workspace-home .local-workspace-tools > button i {
    flex: 0 0 1.2rem;
    color: #69577d;
    text-align: center;
}

.workspace-home .workspace-offline {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border: 1px solid #dfe8dc;
    border-radius: 15px;
    background: #f2f6ee;
    color: #385342;
}

.workspace-home .workspace-offline > i {
    display: grid;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    place-items: center;
    background: #e2eddf;
    color: #466a52;
    font-size: 1.1rem;
}

.workspace-home .workspace-offline h2,
.workspace-home .workspace-offline p {
    margin: 0;
}

.workspace-home .workspace-offline h2 {
    font-size: 0.95rem;
}

.workspace-home .workspace-offline p {
    margin-top: 0.12rem;
    color: #4c6252;
    font-size: 0.82rem;
    line-height: 1.4;
}

.workspace-home .workspace-offline a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.5rem 0.7rem;
    border-radius: 10px;
    color: #31563f;
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.workspace-home .workspace-help {
    margin-top: 1rem;
    border: 1px solid var(--ws-line);
    border-radius: 14px;
    background: var(--ws-surface);
}

.workspace-home .workspace-help > summary {
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    color: #514663;
    font-size: 0.88rem;
    font-weight: 750;
    cursor: pointer;
}

.workspace-home .workspace-help .account-retirement-notice {
    margin: 0 0.75rem 0.75rem;
}

@media (max-width: 760px) {
    .workspace-home {
        padding: 0.75rem;
    }

    .workspace-home .workspace-hero {
        min-height: 122px;
        padding: 0.85rem 1rem;
        border-radius: 18px;
    }

    .workspace-home .workspace-hero-plume,
    .workspace-home .workspace-hero-plume picture,
    .workspace-home .workspace-hero-plume img.plume {
        width: 88px;
        height: 88px;
    }

    .workspace-home .workspace-hero-plume {
        flex-basis: 88px;
    }

    .workspace-home .workspace-hero-intro {
        font-size: 0.88rem;
    }

    .workspace-home .workspace-choice {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 0.6rem;
        min-height: 136px;
        padding: 0.75rem;
    }

    .workspace-home .workspace-choice-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .workspace-home .workspace-choice-description {
        font-size: 0.78rem;
    }
}

@media (max-width: 560px) {
    .workspace-home .workspace-hero {
        min-height: 0;
        gap: 0.25rem;
        padding: 0.8rem 0.85rem;
    }

    .workspace-home .workspace-hero-plume,
    .workspace-home .workspace-hero-plume picture,
    .workspace-home .workspace-hero-plume img.plume {
        width: 64px;
        height: 64px;
    }

    .workspace-home .workspace-hero-plume {
        flex-basis: 64px;
    }

    .workspace-home .workspace-eyebrow {
        font-size: 0.62rem;
    }

    .workspace-home #workspace-title {
        font-size: 1.55rem;
    }

    .workspace-home .workspace-hero-intro {
        margin-top: 0.3rem;
        font-size: 0.8rem;
    }

    .workspace-home .workspace-trust {
        gap: 0.2rem 0.6rem;
        margin-top: 0.35rem;
        font-size: 0.68rem;
    }

    .workspace-home .workspace-choices {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.45rem;
        margin-bottom: 0.55rem;
    }

    .workspace-home .workspace-choice {
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: 96px;
        gap: 0.65rem;
        padding: 0.6rem 0.7rem;
        border-radius: 14px;
    }

    .workspace-home .workspace-choice-icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 1.15rem;
    }

    .workspace-home .workspace-choice-copy {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 0.4rem;
    }

    .workspace-home .workspace-choice-kicker,
    .workspace-home .workspace-choice strong,
    .workspace-home .workspace-choice-description {
        grid-column: 1 / -1;
    }

    .workspace-home .workspace-choice-kicker {
        font-size: 0.59rem;
    }

    .workspace-home .workspace-choice strong {
        font-size: 1rem;
    }

    .workspace-home .workspace-choice-description {
        display: none;
    }

    .workspace-home .workspace-choice-cta {
        grid-column: 1 / -1;
        min-height: 22px;
        margin-top: 0;
        font-size: 0.74rem;
    }

    .workspace-home .workspace-session-line {
        gap: 0.35rem;
    }

    .workspace-home .workspace-session-line button {
        flex: 1 1 auto;
    }

    .workspace-home .workspace-catalogue-heading {
        align-items: flex-start;
    }

    .workspace-home .workspace-offline {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .workspace-home .workspace-offline a {
        grid-column: 2;
        justify-self: start;
        padding-left: 0;
    }
}

@media (max-width: 360px) {
    .workspace-home {
        padding: 0.55rem;
    }

    .workspace-home .workspace-hero-plume,
    .workspace-home .workspace-hero-plume picture,
    .workspace-home .workspace-hero-plume img.plume {
        width: 52px;
        height: 52px;
    }

    .workspace-home .workspace-hero-plume {
        flex-basis: 52px;
    }

    .workspace-home #workspace-title {
        font-size: 1.4rem;
    }

    .workspace-home .workspace-choice {
        min-height: 92px;
    }

    .workspace-home .workspace-catalogue-heading {
        flex-wrap: wrap;
    }
}

[data-theme='dark'] .workspace-home {
    --ws-ink: #eee9f3;
    --ws-muted: #c8c0d0;
    --ws-paper: #191720;
    --ws-surface: #24212c;
    --ws-line: #46404f;
    --ws-lavender: #383044;
    --ws-lavender-ink: #e0d1f4;
    --ws-green: #293a32;
    --ws-green-ink: #c3e2cb;
    --ws-focus: #d4b5fb;
}

[data-theme='dark'] .workspace-home .workspace-hero {
    border-color: #494253;
    background: radial-gradient(ellipse at 88% 10%, #383043 0, #38304300 40%), linear-gradient(112deg, #24212b, #211f28 65%, #2b2632);
    box-shadow: 0 8px 24px #0003;
}

[data-theme='dark'] .workspace-home .workspace-eyebrow,
[data-theme='dark'] .workspace-home .workspace-choice-kicker {
    color: #c6b5d8;
}

[data-theme='dark'] .workspace-home #workspace-title,
[data-theme='dark'] .workspace-home .workspace-choice strong,
[data-theme='dark'] .workspace-home .workspace-catalogue-heading h2 {
    color: #f2edf7;
}

[data-theme='dark'] .workspace-home .workspace-trust {
    color: #c5ddca;
}

[data-theme='dark'] .workspace-home .workspace-trust span::before {
    background: #8db99a;
}

[data-theme='dark'] .workspace-home .workspace-choice,
[data-theme='dark'] .workspace-home .workspace-session-line button,
[data-theme='dark'] .workspace-home #workspace-toggle-tools,
[data-theme='dark'] .workspace-home .workspace-help {
    border-color: #4a4354;
    background: #25222d;
    color: #eee9f3;
}

[data-theme='dark'] .workspace-home .workspace-choice--project .workspace-choice-icon {
    background: #303447;
    color: #d2d9f2;
}

[data-theme='dark'] .workspace-home .workspace-choice-cta {
    color: #d8c4ef;
}

[data-theme='dark'] .workspace-home .local-workspace-status {
    border-color: #405447;
    background: #26352c;
    color: #c9e3d0;
}

[data-theme='dark'] .workspace-home .local-workspace-today {
    border-color: #465345;
    background: #242c26;
}

[data-theme='dark'] .workspace-home .local-workspace-today-heading h2,
[data-theme='dark'] .workspace-home .local-workspace-today h3,
[data-theme='dark'] .workspace-home .local-workspace-today-list {
    color: #e1eee3;
}

[data-theme='dark'] .workspace-home .local-workspace-today-heading p,
[data-theme='dark'] .workspace-home .local-workspace-today-empty {
    color: #c3d2c6;
}

[data-theme='dark'] .workspace-home .local-workspace-tool-group {
    border-color: #46404f;
    background: #24212c;
}

[data-theme='dark'] .workspace-home .local-workspace-tool-group summary,
[data-theme='dark'] .workspace-home .local-workspace-tool-list button,
[data-theme='dark'] .workspace-home .local-workspace-tools > button {
    color: #eee9f3;
}

[data-theme='dark'] .workspace-home .local-workspace-tool-group summary .compteur,
[data-theme='dark'] .workspace-home .local-workspace-tool-group summary > span:last-child {
    background: #393144;
    color: #e3d4f5;
}

[data-theme='dark'] .workspace-home .local-workspace-tool-list {
    border-color: #46404f;
    background: #211f28;
}

[data-theme='dark'] .workspace-home .local-workspace-tool-list button:hover,
[data-theme='dark'] .workspace-home .local-workspace-tools > button:hover,
[data-theme='dark'] .workspace-home .workspace-session-line button:hover,
[data-theme='dark'] .workspace-home #workspace-toggle-tools:hover {
    background: #393144;
}

[data-theme='dark'] .workspace-home #workspace-search {
    border-color: #554b60;
    background: #211f28;
    color: #f2edf7;
}

[data-theme='dark'] .workspace-home #workspace-search::placeholder {
    color: #c3bacd;
}

[data-theme='dark'] .workspace-home .workspace-offline {
    border-color: #435447;
    background: #222d26;
    color: #d6ead9;
}

[data-theme='dark'] .workspace-home .workspace-offline > i {
    background: #304235;
    color: #c8e2ce;
}

[data-theme='dark'] .workspace-home .workspace-offline p,
[data-theme='dark'] .workspace-home .workspace-offline a {
    color: #c5dfcb;
}

@media (prefers-reduced-motion: reduce) {
    .workspace-home *,
    .workspace-home *::before,
    .workspace-home *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .workspace-home {
        width: 100%;
        padding: 0;
        color: #222;
        background: #fff;
    }

    .workspace-home .workspace-hero,
    .workspace-home .workspace-choice,
    .workspace-home .local-workspace-today,
    .workspace-home .local-workspace-tool-group,
    .workspace-home .workspace-offline,
    .workspace-home .workspace-help {
        border-color: #bbb;
        background: #fff;
        box-shadow: none;
        break-inside: avoid;
        print-color-adjust: economy;
    }

    .workspace-home .workspace-hero-plume {
        filter: grayscale(1);
    }

    .workspace-home .workspace-session-line button,
    .workspace-home #workspace-toggle-tools {
        border-color: #999;
        background: #fff;
        color: #222;
    }
}
