<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
             x:Class="GameAtlas.Views.PageParcourir"
             Title="ECRAN DE CONNEXION" WidthRequest="390" HeightRequest="844">


    <Grid x:Name="outerGrid">

        <Grid.Background>
            <LinearGradientBrush EndPoint="1,0">
                <GradientStop Color="#DFE4FF"
                          Offset="0.1" />
                <GradientStop Color="#FDF7E6"
                          Offset="1.0" />
            </LinearGradientBrush>
        </Grid.Background>

        <VerticalStackLayout>
            <HorizontalStackLayout>
                <Image Source="arrow_back.png" VerticalOptions="Start" WidthRequest="30" Margin="20,20,0,0">
                    <Image.GestureRecognizers>
                        <TapGestureRecognizer Tapped="Back_Tapped"/>
                    </Image.GestureRecognizers>
                </Image>

                <SearchBar Placeholder="Rechercher"
                        BackgroundColor="White"
                        TextColor="Black"
                        HorizontalOptions="EndAndExpand"
                        />
            </HorizontalStackLayout>
            <Label
                Text="Rechercher"
                FontFamily="PTSansCBold"
                FontSize="24"
                Grid.Row="3"
                Padding="20"
            />

            <Grid>
                <CollectionView ItemsSource="{Binding ListJeux}" Margin="0,10,0,0" VerticalScrollBarVisibility="Never">
                    <CollectionView.ItemTemplate>
                        <DataTemplate>
                            <Border HeightRequest="97.5" StrokeShape="RoundRectangle 5" VerticalOptions="Start" HorizontalOptions="Center">
                                <Border.Shadow>
                                    <Shadow Brush="Black" Offset="0,4" Radius="4" Opacity="0.4" />
                                </Border.Shadow>
                                <Frame HasShadow="False" HeightRequest="97.5" CornerRadius="5" IsClippedToBounds="True">
                                    <ImageButton HeightRequest="97.5" Source="{Binding Image}" Aspect="AspectFill" Clicked="OnGame_Tapped"/>

                                    
                                </Frame>
                            </Border>
                        </DataTemplate>
                    </CollectionView.ItemTemplate>
                    <CollectionView.ItemsLayout>
                        <GridItemsLayout Span="2" Orientation="Vertical" VerticalItemSpacing="30" HorizontalItemSpacing="15"/>
                    </CollectionView.ItemsLayout>
                </CollectionView>
            </Grid>

        </VerticalStackLayout>

    </Grid>

</ContentPage>