@import url(./imports.css);

html {
    scrollbar-color: var(--background);
    scroll-behavior: smooth;
    color: var(--texte);
}

/*
 * G1 wallpaper session — fond par défaut DefaultAerial (lien DefaultDesktop VM 307, 2026-09-19).
 * Asset : vendors/apple/wallpaper/DefaultAerial.webp (A-original) ; SVG proprietaryUi gardé en option.
 */
body#macos-tahoe {
    --mac-desktop-bg: #EDEDED;
    --mac-desktop-wallpaper: url(../../../../usr/share/capsuleos/assets/images/vendors/apple/wallpaper/DefaultAerial.webp);

    display: var(--f);
    flex-flow: var(--cnw);
    align-items: var(--c);
    justify-content: var(--sb);
    width: var(--max-w);
    height: var(--max-h);
    overflow: var(--n);
    background-color: #EDEDED;
    background-image: var(--mac-desktop-wallpaper);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    /* C4 / G3 status GT P1 Tahoe — centres @1280 (≠ Sequoia/Sonoma) */
    --mac-status-input-x: 1070px;
    --mac-status-sm-x: 1120px;
    --mac-status-spotlight-x: 1104px;
    --mac-status-cc-x: 1135px;
    --mac-status-nc-x: 1230px;
    --mac-status-y: 11px;
    /* C4 / G6 L1 GT P1 Tahoe seedX — Apple@22 … Help@370 */
    --mac-menu-l1-apple-x: 22px;
    --mac-menu-l1-finder-x: 68px;
    --mac-menu-l1-file-x: 125px;
    --mac-menu-l1-edit-x: 175px;
    --mac-menu-l1-view-x: 225px;
    --mac-menu-l1-go-x: 275px;
    --mac-menu-l1-window-x: 320px;
    --mac-menu-l1-help-x: 370px;
    /* G2 Dock GT P2 Tahoe — centres @1280 · y≈775 · Finder@77 (≠ Sequoia@118) */
    --mac-dock-icon: 40px;
    --mac-dock-edge-gap: 8px;
    --mac-dock-y: 96.875%;
    --mac-dock-finder-x: 6.0156%;
    --mac-dock-downloads-x: 82.5%;
    --mac-dock-trash-x: 96.7969%;
    --mac-dock-sep-x: 81.1719%;
    --mac-dock-pill-left: 2.8906%;
    --mac-dock-pill-right: 1.6406%;
    --mac-dock-pill-bottom: 0.5%;
    --mac-dock-fit-pill-left: var(--mac-dock-pill-left);
    --mac-dock-fit-pill-right: var(--mac-dock-pill-right);
    --mac-dock-fit-pill-bottom: var(--mac-dock-pill-bottom);
}

#macosHeader {
    position: relative;
    display: var(--f);
    flex-flow: var(--rnw);
    align-items: var(--c);
    justify-content: var(--sb);
    width: var(--max-w);
    height: calc(var(--head) / 1.5);
    padding-right: 0;
    font-weight: bold;
    background: var(--sonohead);
    backdrop-filter: var(--blur);
}

main {
    display: var(--f);
    flex-flow: var(--cnw);
    align-items: var(--c);
    justify-content: var(--fs);
    width: var(--full);
    height: calc(var(--h80) + calc(var(--h80) / 4));
}

footer {
    position: var(--fs);
    bottom: calc(var(--head) / 2);
    display: var(--f);
    flex-flow: var(--rnw);
    align-items: var(--c);
    justify-content: var(--sa);
    width: calc(var(--head) * 44);
    height: calc(var(--head) * 2);
    padding: calc(var(--head) / 1.2) calc(var(--head) / 3.5);
    border-radius: calc(var(--head) / 2);
    background: var(--sonofoot);
    backdrop-filter: var(--blur);
    transition: transform .5s ease-out;
    transform: translateY(0);
    z-index: 1000;
}

footer.hidden {
    transform: translateY(100%);
}

/*
 * G2 — Dock Tahoe GT P2 (1280×800). Scope skin only.
 * Pill ::before · rangée flex centrée · pastilles noires · Finder@77 · DL@1056 · Trash@1239.
 */
body#macos-tahoe footer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-flow: row nowrap;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    /* C6 : cy icônes ≈ GT 775 — moins de pad bas que Sonoma (+8px) */
    padding-bottom: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    transform: none;
    overflow: visible;
    pointer-events: none;
    z-index: 1000;
}

/* Spécificité ≥ Z1 body.macos-aqua#macos-tahoe footer[data-mac-dock-layout] */
body.macos-aqua#macos-tahoe footer[data-mac-dock-layout] {
    padding-bottom: 5px;
}

body#macos-tahoe footer::before {
    position: absolute;
    top: auto;
    right: var(--mac-dock-fit-pill-right);
    bottom: var(--mac-dock-fit-pill-bottom);
    left: var(--mac-dock-fit-pill-left);
    height: 54px;
    border-radius: 18px;
    background: var(--sonofoot);
    backdrop-filter: var(--blur);
    content: '';
    pointer-events: none;
    z-index: 0;
}

body#macos-tahoe footer.hidden {
    transform: translateY(110%);
}

body#macos-tahoe footer.hidden::before {
    opacity: 0;
}

/*
 * Dock auto-hide Tahoe — footer plein viewport (≠ Sonoma).
 * La règle générique feature-flags.css (translateY footer) est neutralisée
 * par body#macos-tahoe footer { transform: none }. On anime pill + icônes.
 */
body#macos-tahoe[data-mac-dock-autohide="true"] footer::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 14px;
    content: '';
    pointer-events: auto;
    z-index: 3;
}

/*
 * Autohide Tahoe — transform footer (Z1 feature-flags.css).
 * Ne plus décaler les icônes via top absolu (cassait le flex Grafikart).
 */
body#macos-tahoe[data-mac-dock-autohide="true"] footer::before {
    transition: opacity 0.22s ease;
}

body#macos-tahoe[data-mac-dock-autohide="true"] footer > a,
body#macos-tahoe[data-mac-dock-autohide="true"] footer > hr {
    top: auto;
}
