/* Portail neuro.hylst.fr : feuille unique, aucune ressource externe. */

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/outfit/outfit-300-normal-latin-97312486bc.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/outfit/outfit-300-normal-latin-ext-feaf43e855.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --bg: #0b1220;
    --surface: #111a2e;
    --border: #22345a;
    --text: #e6ecf5;
    --muted: #93a1bd;
    --accent: #5ed6a4;
    --link: #7dd3fc;
    --focus: #5ed6a4;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
}

a { color: var(--link); }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

.skip {
    position: absolute;
    left: 16px;
    top: -60px;
    padding: 8px 14px;
    background: var(--accent);
    color: #0b1220;
    font-weight: 600;
    border-radius: 8px;
    z-index: 10;
}
.skip:focus { top: 12px; }

.top { border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.01em; }
.brand span { color: var(--accent); }
.top nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--accent); }

main { flex: 1; padding-top: 48px; padding-bottom: 48px; }

.intro h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.15; font-weight: 700; }
.intro p { margin: 0 0 40px; max-width: 640px; color: var(--muted); font-size: 1.15rem; }

.section-title { margin: 0 0 16px; font-size: 1.25rem; font-weight: 600; }
.kbd-hint { margin: -8px 0 16px; color: var(--muted); font-size: 0.92rem; }

.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.app {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
}
.app:hover { border-color: var(--accent); }
.app img { width: 64px; height: 64px; }
.app-name { font-size: 1.3rem; font-weight: 600; }
.app-desc { color: var(--muted); }

.note { margin: 24px 0 0; color: var(--muted); }

.move {
    margin-top: 48px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    background: var(--surface);
}
.move h2 { margin: 0 0 8px; font-size: 1.1rem; font-weight: 600; }
.move p { margin: 0; color: var(--muted); }
.move p + p { margin-top: 12px; }

.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.95rem; }
.foot p { margin: 0; padding: 20px 0; }

.error { text-align: center; padding-top: 12vh; }
.error .code { margin: 0; font-size: 5rem; font-weight: 700; color: var(--accent); line-height: 1; }
.error h1 { font-size: 1.6rem; }
.error p { color: var(--muted); }

/* Effets de cartes et de navigation, alignes sur le menu du hub. */
@keyframes appIn {
    from { opacity: 0; transform: translateY(18px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes accentBar {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.intro h1::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin-top: 18px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), rgba(94, 214, 164, 0));
    transform-origin: left center;
    animation: accentBar 0.8s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.top nav a { position: relative; }
.top nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    border-radius: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}
.top nav a:hover::after,
.top nav a:focus-visible::after { transform: scaleX(1); }

.app {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0));
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, box-shadow 0.35s ease;
    animation: appIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
.apps li:nth-child(2) .app { animation-delay: 0.06s; }
.apps li:nth-child(3) .app { animation-delay: 0.12s; }
.apps li:nth-child(4) .app { animation-delay: 0.18s; }
.apps li:nth-child(5) .app { animation-delay: 0.24s; }
.apps li:nth-child(6) .app { animation-delay: 0.3s; }
.apps li:nth-child(7) .app { animation-delay: 0.36s; }
.apps li:nth-child(8) .app { animation-delay: 0.42s; }
.apps li:nth-child(9) .app { animation-delay: 0.48s; }
.apps li:nth-child(10) .app { animation-delay: 0.54s; }
.apps li:nth-child(11) .app { animation-delay: 0.6s; }
.apps li:nth-child(12) .app { animation-delay: 0.66s; }

.app::before {
    content: "";
    position: absolute;
    inset: -30% -10% auto -10%;
    height: 75%;
    background: radial-gradient(60% 60% at 30% 30%, rgba(94, 214, 164, 0.22), transparent 70%);
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.92);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
}
.app::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 45%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.app > * { position: relative; z-index: 1; }

.app:hover,
.app:focus-visible {
    --lift: -8px;
    border-color: var(--accent);
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(94, 214, 164, 0.2);
}
.app:hover::before,
.app:focus-visible::before { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.app:hover::after,
.app:focus-visible::after { opacity: 1; }

.app img {
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.35s ease;
    transform: translate(var(--ix, 0), var(--iy, 0)) scale(var(--is, 1)) rotate(var(--ir, 0deg));
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}
.app:hover img,
.app:focus-visible img {
    --is: 1.08;
    --ir: -2deg;
    filter: drop-shadow(0 0 14px rgba(94, 214, 164, 0.35));
}

.app-name { transition: color 0.25s ease; }
.app:hover .app-name,
.app:focus-visible .app-name { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
    .app {
        transition: none;
        animation: none;
        transform: none;
    }
    .app:hover,
    .app:focus-visible {
        --lift: 0;
        transform: none;
    }
    .app::before,
    .app::after,
    .app img,
    .app-name,
    .top nav a::after {
        transition: none;
    }
    .app img { transform: none; }
    .intro h1::after { animation: none; }
}
