@layer page {

    .main {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 0;
        min-height: 100vh;
        width: 100%;
    }

    .hub-gallery {
        margin-top: 10vh;
        margin-bottom: 15vh;
        width: 100%;
        max-width: 1200px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .hub-gallery-item {
        display: flex;
        flex-direction: column;
        margin: 10px;
        flex: 1 1 300px;
        max-width: 300px;
        min-width: 220px;
    }

    .hub-gallery-item:hover {
        transform: scale(1.05);
    }

    .hub-gallery-item div {
        padding: 0.8rem;
    }

    .hub-gallery-item div a {
        height: 1.3rem;
    }

    :where(.hub-gallery-item) h2 {
        margin-block: 0.83em;
    }

    /* =========================
       SYSTÈME DE VUES (HUB / FRAGMENT)
       ========================= */

    [data-hub-slot] {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .error-message {
        padding: 20px;
    }

    /* =========================
       FIGURINE STYLES (depuis figurine.css)
       Carrousel d'images pour la prévisualisation de figurines
       ========================= */
    .content-display-section {
        margin-top: 10vh;
        width: 100vw;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* TITRE */
    .download-title {
        margin-top: 2vh;
        margin-bottom: 20px;
    }

    .download-title h2 {
        margin: 0;
    }

    /* BLOC TÉLÉCHARGEMENT */
    .download {
        margin-top: 10vh;
        width: 90vw;
        max-width: 900px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        padding: 0 16px;
        box-sizing: border-box;
        margin-bottom: 30vh;
    }

    /* MENTION DE PORTEE — norme interne, commune aux deux fragments */

    /* PROPRIETES GENERALES */
    .download-properties {
        width: 100%;
        padding: 24px;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 16px;
        box-sizing: border-box;
    }

    .download-properties h3 {
        grid-column: 1 / -1;
        margin: 0 0 8px 0;
    }

    .download-property {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
    }

    .download-property svg {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
    }

    .download-property .download-property-name {
        flex: 1;
    }

    .download-property .download-property-value {
        padding: 4px 10px;
    }

    /* ÉLÉMENTS TÉLÉCHARGEMENT */
    .download-items {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px 20px;
        box-sizing: border-box;
    }

    .download-items:hover {
        transform: translateY(-2px);
    }

    .download-items .download-detail {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .download-items .download-detail h3 {
        margin: 0;
    }

    .download-items .download-detail p {
        margin: 0;
    }

    .download-action {
        flex-shrink: 0;
    }

    .download-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px 20px;
    }

    /* RESPONSIVE BLOCK-GET-ELEMENTS */
    @media (max-width: 600px) {
        .download {
            margin-top: 6vh;
            padding: 0 12px;
            gap: 20px;

        }
        .download-properties {
            padding: 18px;
            grid-template-columns: 1fr;
            gap: 12px;

        }
        .download-property {
            padding: 10px 12px;

        }
        .download-items {
            flex-direction: column;
            align-items: stretch;
            padding: 16px;
            gap: 12px;

        }
        .download-action {
            width: 100%;

        }
        .download-action {
            width: 100%;

        }
    }

    .hub-gallery-item {
        border-radius: var(--local-radius-symbol-hub-gallery-item);
        background-color: var(--local-color-decor-symbol-hub-gallery-item-surface);
        background-image: linear-gradient(165deg, var(--local-color-decor-symbol-hub-gallery-item-surface-2), var(--local-color-decor-symbol-hub-gallery-item-surface-3));
        backdrop-filter: blur(7px);
    }

    .hub-gallery-item:hover {
        box-shadow: var(--local-shadow-symbol-hub-gallery-item-hover);
        filter: contrast(1.05);
    }

    .hub-gallery-item div {
        background-color: var(--local-color-decor-symbol-surface);
        border: 1px solid var(--raw-color-white-70);
        border-radius: var(--local-radius-symbol-hub-gallery-item);
    }

    .content-display-section {
        background-color: var(--local-color-decor-symbol-content-display-section-surface);
        background-image: linear-gradient(to bottom, var(--raw-color-pearl-1), var(--local-color-decor-symbol-content-display-section-surface) 20%, var(--local-color-decor-symbol-content-display-section-surface) 80%, var(--raw-color-pearl-1));
        backdrop-filter: brightness(1.05 ) blur(7px);
        border: 1px solid var(--raw-color-white-90);
    }

    .download-properties {
        background-color: var(--local-color-decor-symbol-download-properties-surface);
        backdrop-filter: blur(18px);
        border-radius: var(--local-radius-symbol-download-properties);
        border: 1px solid var(--raw-color-white-70);
        box-shadow: var(--local-shadow-symbol-download-properties);
    }

    .download-property {
        background-color: var(--local-color-decor-symbol-download-property-surface);
        border-radius: var(--local-radius-symbol-download-property);
        border: 1px solid var(--raw-color-white-90);
    }

    .download-property svg {
        opacity: 0.7;
    }

    .download-property .download-property-value {
        background-color: var(--local-color-decor-symbol-download-property-value-surface);
        border-radius: var(--local-radius-symbol-download-property-value);
        border: 1px solid var(--local-color-decor-symbol-download-property-value-line);
    }

    .download-items {
        background-color: var(--raw-color-pearl-2);
        border-radius: var(--local-radius-symbol-download-items);
        border: 2px solid var(--raw-color-white-90);
    }

    .download-items:hover {
        box-shadow: var(--local-shadow-symbol-download-items-hover);
        background-color: var(--raw-color-pearl-1);
        border-color: var(--local-color-decor-symbol-download-items-hover-line);
        filter: brightness(1.2);
    }

    .hub-gallery-item {
        text-align: center;
    }

    .hub-gallery-item div h2 {
        text-align: center;
        font-size: var(--canon-size-title);
        font-weight: 600;
    }

    .error-message {
        color: var(--local-color-decor-symbol-error-message-ink);
        text-align: center;
    }

    .download-title h2 {
        font-size: var(--canon-size-title);
        font-family: var(--canon-font-figura);
        font-weight: 800;
        color: var(--raw-color-black-85);
    }

    .download-properties h3 {
        font-size: var(--canon-size-subtitle);
        font-weight: 600;
        text-align: center;
        color: var(--raw-color-black-85);
    }

    .download-property {
        font-size: var(--canon-size-control);
    }

    .download-property .download-property-name {
        font-weight: 400;
        color: var(--raw-color-black-70);
    }

    .download-property .download-property-value {
        font-weight: 600;
        color: var(--raw-color-black-90);
        white-space: nowrap;
    }

    .download-items .download-detail h3 {
        font-size: var(--canon-size-body);
        font-weight: 600;
        color: var(--raw-color-black-90);
    }

    .download-items .download-detail p {
        font-size: var(--canon-size-note);
        color: var(--raw-color-black-60);
    }

    .download-action {
        font-size: var(--canon-size-control);
        font-weight: 500;
        white-space: nowrap;
    }

    @media (max-width: 600px) {
        .download-properties h3 {
            font-size: var(--canon-size-body);

        }
        .download-property {
            font-size: var(--canon-size-note);

        }
        .download-items .download-detail {
            text-align: center;

        }
        .download-action {
            text-align: center;

        }
    }

    .hub-gallery-item {
        transition: box-shadow 0.3s ease, transform 0.3s ease, filter 0.4s ease;
    }

    .hub-gallery-item:hover {
        transition: box-shadow 0.3s ease, transform 0.3s ease, filter 0.4s ease;
    }

    .download-items {
        transition: all 0.25s ease;
    }
}
