<Window x:Class="PSLauncher.App.Views.AutoRelaunchDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:loc="clr-namespace:PSLauncher.Core.Localization;assembly=PSLauncher.Core"
        Title="{x:Static loc:Strings.AutoRelaunchTitle}"
        Icon="pack://application:,,,/Resources/favicon.ico"
        Width="560" Height="420"
        ResizeMode="NoResize"
        WindowStartupLocation="CenterOwner"
        Topmost="True"
        Background="{StaticResource Brush.Bg.Window}">
    <Grid Margin="36,32">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <!-- Titre dynamique : "Vérification de la santé système" pendant la
             phase d'attente, "Lancement automatique" pendant le countdown. -->
        <TextBlock Grid.Row="0"
                   x:Name="TitleText"
                   Text="{x:Static loc:Strings.AutoRelaunchTitle}"
                   FontSize="22" FontWeight="SemiBold"
                   Foreground="{StaticResource Brush.Text.Primary}"
                   HorizontalAlignment="Center" />

        <TextBlock Grid.Row="1"
                   x:Name="MessageText"
                   FontSize="14"
                   Foreground="{StaticResource Brush.Text.Secondary}"
                   TextWrapping="Wrap"
                   TextAlignment="Center"
                   Margin="0,16,0,0" />

        <!-- Affiché pendant la phase santé : compteur d'indicateurs en attente
             + nom des checks non-OK. Masqué pendant le countdown. -->
        <TextBlock Grid.Row="2"
                   x:Name="HealthPendingText"
                   FontSize="13"
                   Foreground="#FBBF24"
                   TextWrapping="Wrap"
                   TextAlignment="Center"
                   Margin="0,12,0,0"
                   Visibility="Collapsed" />

        <!-- Affiché pendant le countdown. Gros chiffre orange. -->
        <TextBlock Grid.Row="2"
                   x:Name="CountdownText"
                   FontSize="72"
                   FontWeight="Bold"
                   HorizontalAlignment="Center"
                   Foreground="{StaticResource Brush.Accent}"
                   Margin="0,20,0,0"
                   Visibility="Collapsed" />

        <!-- Row 3 = espacement * pour aérer entre le contenu et le bouton -->

        <Button Grid.Row="4"
                Style="{StaticResource DangerButton}"
                Content="{x:Static loc:Strings.AutoRelaunchCancel}"
                FontSize="14"
                Padding="40,12"
                HorizontalAlignment="Center"
                Margin="0,16,0,0"
                IsCancel="True"
                IsDefault="True"
                Click="OnCancel" />
    </Grid>
</Window>
