@layer components {

    .main {
        min-height: 100vh;
    }

    /* =========================
       CONTAINER SELECT GROUPE
       ========================= */
    .plates-filter {
        position: relative;
        z-index: 50;
        width: calc(80vw - 80px);
        max-width: 1000px;
        margin: 0 16px;
        padding: 20px 50px;
        box-sizing: border-box;
    }
    .plates-filter-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }
    .plates-filter-label {
        flex: none;
    }

    .plates-filter-field {
        flex: 1;
        width: 100%;
    }

    /* =========================
       CARROUSEL CONTAINER
       ========================= */
    .plates {
        width: 80vw;
        max-width: 1000px;
        margin: 0 auto;
        padding: 20px 0;
        box-sizing: border-box;
    }
    .plates-carousel {
        align-items: center;
    }

    /* =========================
       DIAPOSITIVES (la hauteur est définie dynamiquement via JS), dans leur cadre
       ========================= */
    /* le cadre laisse aux pas, posés sur les bords du carrousel, la marge de leur largeur */
    .plates-viewport {
        width: calc(100% - 80px);
        overflow: hidden;
    }
    /* la pile du carrousel canonique : les groupes se superposent le temps du fondu croisé */
    .plates-slides {
        width: 100%;
        height: 100%;
    }

    /* =========================
       INDICATEUR DE CHARGEMENT
       ========================= */
    .plates-loader {
        width: 100%;
        height: 40vh;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 5;
    }

    /* =========================
       GROUPE (une diapositive du carrousel)
       ========================= */
    .plates-group {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 16px;
        padding: 20px;
        min-width: 100%;
        height: 100%;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    /* =========================
       IMAGE (un bouton qui l'agrandit)
       ========================= */
    .plates-item {
        flex: 1 1 auto;
        max-width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px;
        overflow: hidden;
    }

    .plates-item img {
        max-width: 100%;
        max-height: 100%;
        height: auto;
        width: auto;
        object-fit: contain;
    }

    /* =========================
       MESSAGE VIDE
       ========================= */
    .plates-empty {
        min-width: 100%;
        min-height: 200px;
    }

    /* =========================
    /* =========================
       RESPONSIVE CARROUSEL
       ========================= */
    .plates-filter {
        padding: 0 40px;
    }


    .plates-group {
        gap: 12px;
        padding: 15px;
    }

    @media (max-width: 800px) {
        .plates {
            width: 100vw;

        }
        .plates-viewport {
            width: 100vw;

        }
    }

    @media (max-width: 600px) {
        .plates-filter {
            padding: 10px 20px;

        }
        .plates-filter-row {
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;

        }
        .plates-filter-field {
            width: 100%;
            max-width: none;

        }
    }

    .plates-filter {
        background-color: var(--raw-color-white-70);
        backdrop-filter: blur(17px);
        border: 1px solid var(--raw-color-white-90);
        border-radius: var(--local-radius-plates-filter);
        box-shadow: var(--local-shadow-plates-filter);
    }

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

    .plates-item {
        background-color: var(--local-color-decor-plates-item-surface);
        border: 0;
        border-radius: var(--local-radius-plates-item);
    }

    .plates-item:hover {
        background-color: var(--local-color-decor-plates-item-hover-surface);
    }

    @media (max-width: 800px) {
        .plates-viewport {
            border-radius: 0;
            background-color: transparent;
            background-image: linear-gradient(90deg, var(--local-color-decor-plates-viewport-surface-2) , var(--local-color-decor-plates-viewport-surface) 30%, var(--local-color-decor-plates-viewport-surface) 70%, var(--local-color-decor-plates-viewport-surface-3));

        }
    }

    @media (max-width: 600px) {
        .plates-filter {
            border-radius: var(--local-radius-plates-filter-2);

        }
        .plates-filter-field {
            background-color: var(--local-color-decor-plates-filter-field-surface);
            border-radius: var(--local-radius-plates-filter-2);

        }
    }

    .plates-item {
        cursor: pointer;
    }

    .plates-item:hover {
        transition: background-color 0.3s ease;
    }
}
