commit 9fd69a0ea27c02c00b95691d16ea3ea6a3e84be5
Author: lbihannic <lucas.bihannic@inrae.fr>
Date:   Tue Apr 1 13:59:08 2025 +0200

    add behaviour on chambers page and disable

diff --git a/GES_PAC/AppShell.xaml.cs b/GES_PAC/AppShell.xaml.cs
index 874dd6c..95bb7b9 100644
--- a/GES_PAC/AppShell.xaml.cs
+++ b/GES_PAC/AppShell.xaml.cs
@@ -20,6 +20,7 @@ namespace GES_PAC
             Routing.RegisterRoute(nameof(ChambersView), typeof(ChambersView));
             Routing.RegisterRoute(nameof(EnterAnimalView), typeof(EnterAnimalView));
             Routing.RegisterRoute(nameof(CreateMeasureView), typeof(CreateMeasureView));
+            Routing.RegisterRoute(nameof(CreateBehaviourView), typeof(CreateBehaviourView));
         }
     }
 }
diff --git a/GES_PAC/GES_PAC.csproj b/GES_PAC/GES_PAC.csproj
index 24b8b07..efc268b 100644
--- a/GES_PAC/GES_PAC.csproj
+++ b/GES_PAC/GES_PAC.csproj
@@ -123,6 +123,9 @@
 	  <MauiXaml Update="View\SetListView.xaml">
 	    <Generator>MSBuild:Compile</Generator>
 	  </MauiXaml>
+	  <MauiXaml Update="View\CreateBehaviourView.xaml">
+	    <Generator>MSBuild:Compile</Generator>
+	  </MauiXaml>
 	  <MauiXaml Update="View\Tools\ConnectionIndicatorView.xaml">
 	    <Generator>MSBuild:Compile</Generator>
 	  </MauiXaml>
diff --git a/GES_PAC/GES_PAC.csproj.user b/GES_PAC/GES_PAC.csproj.user
index bb23a41..0cc333a 100644
--- a/GES_PAC/GES_PAC.csproj.user
+++ b/GES_PAC/GES_PAC.csproj.user
@@ -3,7 +3,7 @@
   <PropertyGroup>
     <IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
     <ActiveDebugFramework>net9.0-android</ActiveDebugFramework>
-    <ActiveDebugProfile>Xiaomi 23090RA98G (Android 14.0 - API 34)</ActiveDebugProfile>
+    <ActiveDebugProfile>Xiaomi 23090RA98G (Android 15.0 - API 35)</ActiveDebugProfile>
     <SelectedPlatformGroup>PhysicalDevice</SelectedPlatformGroup>
     <DefaultDevice>pixel_7_-_api_35</DefaultDevice>
     <SelectedDevice>Xiaomi 23090RA98G</SelectedDevice>
diff --git a/GES_PAC/Model/Comportement.cs b/GES_PAC/Model/Comportement.cs
index 80d16b7..ae30406 100644
--- a/GES_PAC/Model/Comportement.cs
+++ b/GES_PAC/Model/Comportement.cs
@@ -3,19 +3,20 @@ namespace GES_PAC.Model
 {
     public class Comportement
     {
+        private DateTime date;
+        private TypeComportement selectedType;
+        private string description;
+
+        public Comportement(DateTime date, TypeComportement selectedType, string description)
+        {
+            this.date = date;
+            this.selectedType = selectedType;
+            this.description = description;
+        }
+
         public long Id { get; set; }
         public DateTime Time { get; set; }
-        public TypeComportement Type { get; set; }
+        public TypeComportement? Type { get; set; }
         public string? Commentaire { get; set; }
     }
-
-    public enum TypeComportement
-    {
-        SUFFOCATION,
-        AGITATION,
-        HYPERTENSION,
-        HYPOGLYCEMIE,
-        HYPERGLYCEMIE,
-        AUTRE
-    }
 }
diff --git a/GES_PAC/Model/PhaseCalibration.cs b/GES_PAC/Model/PhaseCalibration.cs
index 9fa0343..64440a0 100644
--- a/GES_PAC/Model/PhaseCalibration.cs
+++ b/GES_PAC/Model/PhaseCalibration.cs
@@ -11,7 +11,7 @@ namespace GES_PAC.Model
         public string Name { get; }
         public int Value { get; }
 
-        private PhaseCalibration(string name, int value) // a passer en public quand integration webservice
+        private PhaseCalibration(string name, int value)
         {
             Name = name;
             Value = value;
diff --git a/GES_PAC/Model/Serie.cs b/GES_PAC/Model/Serie.cs
index d25ddb0..bdc957d 100644
--- a/GES_PAC/Model/Serie.cs
+++ b/GES_PAC/Model/Serie.cs
@@ -1,4 +1,6 @@
 
+using System.Collections.ObjectModel;
+
 namespace GES_PAC.Model
 {
     public class Serie
@@ -34,9 +36,31 @@ namespace GES_PAC.Model
             SeriesAnimales.Add(serieAnimal);
         }
 
-        public Dictionary<int, int> GetMeasureNumber()
+        public int GetMeasureNumberByNumeroBoite(int nb)
+        {
+            var sa = SeriesAnimales.FirstOrDefault(sa => sa.NumeroBoite == nb);
+            if (sa == null)
+                return 0;
+            return sa.GetMeasureCount();
+        }
+
+        public bool GetHasBehaviourByNumeroBoite(int nb)
+        {
+            var sa = SeriesAnimales.FirstOrDefault(sa => sa.NumeroBoite == nb);
+            if (sa == null)
+                return false;
+            return sa.HasBehaviour();
+        }
+
+        public ObservableCollection<bool> GetIsOutDatas()
         {
-            return SeriesAnimales.ToDictionary(sa => sa.NumeroBoite, sa => sa.GetMeasureCount());
+            var isOutDatas = new ObservableCollection<bool>();
+            for (int i = 1; i <= 12; i++)
+            {
+                var serieAnimal = SeriesAnimales.FirstOrDefault(sa => sa.NumeroBoite == i);
+                isOutDatas.Add(!serieAnimal?.IsOut ?? true);
+            }
+            return isOutDatas;
         }
 
         public Mesure? GetLastMeasureByNumeroBoite(int numeroBoite)
@@ -51,6 +75,14 @@ namespace GES_PAC.Model
         {
             SeriesAnimales.Select(sa => sa).Where(sa => sa.NumeroBoite == numBoite).First().AddMeasure(newMeasure);
         }
+
+        internal void AddBehaviour(Comportement newBehaviour, int numBoite, bool isAnimalOut)
+        {
+            var sa = SeriesAnimales.Select(sa => sa).Where(sa => sa.NumeroBoite == numBoite).First();
+            sa.AddBehaviour(newBehaviour);
+            if (isAnimalOut)
+                sa.IsOut = true;
+        }
         #endregion
     }
 }
diff --git a/GES_PAC/Model/SerieAnimal.cs b/GES_PAC/Model/SerieAnimal.cs
index 853ced2..22e78e1 100644
--- a/GES_PAC/Model/SerieAnimal.cs
+++ b/GES_PAC/Model/SerieAnimal.cs
@@ -1,4 +1,6 @@
 
+using Microsoft.Maui.Layouts;
+
 namespace GES_PAC.Model
 {
     public class SerieAnimal
@@ -10,6 +12,7 @@ namespace GES_PAC.Model
         public string RFID { get; set; }
         public List<Mesure> Mesures { get; set; }
         public List<Comportement> Comportements { get; set; }
+        public bool IsOut { get; set; } = false;
 
         public SerieAnimal(int numeroBoite, double poids, DateTime datePesee, string rFID)
         {
@@ -35,5 +38,15 @@ namespace GES_PAC.Model
         {
             return Mesures.Last();
         }
+
+        public void AddBehaviour(Comportement newBehaviour)
+        {
+            Comportements.Add(newBehaviour);
+        }
+
+        public bool HasBehaviour()
+        {
+            return Comportements.Any();
+        }
     }
 }
diff --git a/GES_PAC/Model/TypeCalibration.cs b/GES_PAC/Model/TypeCalibration.cs
index 92e3234..3bab5da 100644
--- a/GES_PAC/Model/TypeCalibration.cs
+++ b/GES_PAC/Model/TypeCalibration.cs
@@ -1,9 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
 namespace GES_PAC.Model
 {
     public class TypeCalibration
diff --git a/GES_PAC/Model/TypeComportement.cs b/GES_PAC/Model/TypeComportement.cs
new file mode 100644
index 0000000..89ae521
--- /dev/null
+++ b/GES_PAC/Model/TypeComportement.cs
@@ -0,0 +1,34 @@
+
+namespace GES_PAC.Model
+{
+    public class TypeComportement
+    {
+        public string Name { get; }
+        public int Value { get; }
+
+        private TypeComportement(string name, int value)
+        {
+            Name = name;
+            Value = value;
+        }
+
+        public static readonly TypeComportement SUFFOCATION = new("SUFFOCATION", 1);
+        public static readonly TypeComportement AGITATION = new("AGITATION", 2);
+        public static readonly TypeComportement PERTE_DE_CONNAISSANCE = new("PERTE DE CONNAISSANCE", 3);
+        public static readonly TypeComportement HYPOTHERMIE = new("HYPOTHERMIE", 4);
+        public static readonly TypeComportement HYPERTHERMIE = new("HYPERTHERMIE", 5);
+        public static readonly TypeComportement AUTRE = new("AUTRE", 6);
+
+        public static readonly List<TypeComportement> All = new()
+        {
+            SUFFOCATION,
+            AGITATION,
+            PERTE_DE_CONNAISSANCE,
+            HYPOTHERMIE,
+            HYPERTHERMIE,
+            AUTRE
+        };
+
+        public override string ToString() => Name;
+    }
+}
diff --git a/GES_PAC/Resources/Styles/Styles.xaml b/GES_PAC/Resources/Styles/Styles.xaml
index a180c55..0d3220b 100644
--- a/GES_PAC/Resources/Styles/Styles.xaml
+++ b/GES_PAC/Resources/Styles/Styles.xaml
@@ -500,6 +500,11 @@
                             <Setter Property="Opacity" Value="1" />
                         </VisualState.Setters>
                     </VisualState>
+                    <VisualState x:Name="Disabled">
+                        <VisualState.Setters>
+                            <Setter Property="Opacity" Value="0.3" />
+                        </VisualState.Setters>
+                    </VisualState>
                 </VisualStateGroup>
             </VisualStateGroupList>
         </Setter>
diff --git a/GES_PAC/View/ChambersView.xaml b/GES_PAC/View/ChambersView.xaml
index a4c3764..fe7f6fc 100644
--- a/GES_PAC/View/ChambersView.xaml
+++ b/GES_PAC/View/ChambersView.xaml
@@ -49,54 +49,55 @@
 
                                 <!-- Boutons Gauche -->
                                 <Grid Grid.Row="5" Grid.Column="0">
-                                    <Button Text="1" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="1" BackgroundColor="{Binding ChamberColors[0]}" />
+                                    <Button Text="1" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="1" BackgroundColor="{Binding ChamberColors[0]}" IsEnabled="{Binding ChamberIsIn[0]}"/>
                                     <Label Text="{Binding ChamberNumbers[0]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
+									<Label Text="{Binding ChamberIsOut[0]}" FontSize="10" Margin="10" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="4" Grid.Column="0">
-                                    <Button Text="3" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="3" BackgroundColor="{Binding ChamberColors[2]}" />
+                                    <Button Text="3" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="3" BackgroundColor="{Binding ChamberColors[2]}" IsEnabled="{Binding ChamberIsIn[2]}"/>
                                     <Label Text="{Binding ChamberNumbers[2]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="3" Grid.Column="0">
-                                    <Button Text="5" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="5" BackgroundColor="{Binding ChamberColors[4]}" />
+                                    <Button Text="5" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="5" BackgroundColor="{Binding ChamberColors[4]}" IsEnabled="{Binding ChamberIsIn[4]}"/>
                                     <Label Text="{Binding ChamberNumbers[4]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="2" Grid.Column="0">
                                     
-                                    <Button Text="7" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="7" BackgroundColor="{Binding ChamberColors[6]}" />
+                                    <Button Text="7" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="7" BackgroundColor="{Binding ChamberColors[6]}" IsEnabled="{Binding ChamberIsIn[6]}"/>
                                     <Label Text="{Binding ChamberNumbers[6]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="1" Grid.Column="0">
-                                    <Button Text="9" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="9" BackgroundColor="{Binding ChamberColors[8]}" />
+                                    <Button Text="9" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="9" BackgroundColor="{Binding ChamberColors[8]}" IsEnabled="{Binding ChamberIsIn[8]}"/>
                                     <Label Text="{Binding ChamberNumbers[8]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="0" Grid.Column="0">
-                                    <Button Text="11" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="11" BackgroundColor="{Binding ChamberColors[10]}" />
+                                    <Button Text="11" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="11" BackgroundColor="{Binding ChamberColors[10]}" IsEnabled="{Binding ChamberIsIn[10]}"/>
                                     <Label Text="{Binding ChamberNumbers[10]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
 
                                 <!-- Boutons Droite -->
                                 <Grid Grid.Row="5" Grid.Column="2">
-                                    <Button Text="2" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="2" BackgroundColor="{Binding ChamberColors[1]}" />
+                                    <Button Text="2" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="2" BackgroundColor="{Binding ChamberColors[1]}" IsEnabled="{Binding ChamberIsIn[1]}"/>
                                     <Label Text="{Binding ChamberNumbers[1]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="4" Grid.Column="2">
-                                    <Button Text="4" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="4" BackgroundColor="{Binding ChamberColors[3]}" />
+                                    <Button Text="4" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="4" BackgroundColor="{Binding ChamberColors[3]}" IsEnabled="{Binding ChamberIsIn[3]}"/>
                                     <Label Text="{Binding ChamberNumbers[3]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="3" Grid.Column="2">
-                                    <Button Text="6" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="6" BackgroundColor="{Binding ChamberColors[5]}" />
+                                    <Button Text="6" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="6" BackgroundColor="{Binding ChamberColors[5]}" IsEnabled="{Binding ChamberIsIn[5]}"/>
                                     <Label Text="{Binding ChamberNumbers[5]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="2" Grid.Column="2">
-                                    <Button Text="8" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="8" BackgroundColor="{Binding ChamberColors[7]}" />
+                                    <Button Text="8" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="8" BackgroundColor="{Binding ChamberColors[7]}" IsEnabled="{Binding ChamberIsIn[7]}"/>
                                     <Label Text="{Binding ChamberNumbers[7]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="1" Grid.Column="2">
-                                    <Button Text="10" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="10" BackgroundColor="{Binding ChamberColors[9]}" />
+                                    <Button Text="10" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="10" BackgroundColor="{Binding ChamberColors[9]}" IsEnabled="{Binding ChamberIsIn[9]}"/>
                                     <Label Text="{Binding ChamberNumbers[9]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
                                 <Grid Grid.Row="0" Grid.Column="2">
-                                    <Button Text="12" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="12" BackgroundColor="{Binding ChamberColors[11]}" />
+                                    <Button Text="12" Style="{StaticResource ChambreButtonStyle}" Command="{Binding OnClickChamberCommand}" CommandParameter="12" BackgroundColor="{Binding ChamberColors[11]}" IsEnabled="{Binding ChamberIsIn[11]}"/>
                                     <Label Text="{Binding ChamberNumbers[11]}" FontSize="10" Margin="3" HorizontalOptions="Start" VerticalOptions="Start" />
                                 </Grid>
 
diff --git a/GES_PAC/View/CreateBehaviourView.xaml b/GES_PAC/View/CreateBehaviourView.xaml
new file mode 100644
index 0000000..1733656
--- /dev/null
+++ b/GES_PAC/View/CreateBehaviourView.xaml
@@ -0,0 +1,93 @@
+<?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:vm="clr-namespace:GES_PAC.ViewModel"
+             xmlns:tools="clr-namespace:GES_PAC.View.Tools"
+             x:Class="GES_PAC.View.CreateBehaviourView"
+             x:DataType="vm:CreateBehaviourViewModel">
+
+    <Grid>
+        <StackLayout BackgroundColor="White" Spacing="50">
+            <tools:ConnectionIndicatorView />
+            <ScrollView>
+
+                <VerticalStackLayout Grid.Row="1" Spacing="30">
+
+                    <Label Text="{Binding Titre}"
+                       FontSize="20"
+                       FontAttributes="Bold"
+                       HorizontalOptions="Center" />
+                    <VerticalStackLayout Spacing="15" WidthRequest="300">
+
+                        <!-- Type de comportement -->
+                        <VerticalStackLayout>
+
+                            <Label Text="Type de comportement" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
+
+                            <Picker Title="Sélectionnez un type de comportement"
+                                ItemsSource="{Binding TypeComp}"
+                                ItemDisplayBinding="{Binding Name}"
+                                SelectedItem="{Binding SelectedType}" />
+
+
+                            <Label Text="Sélectionnez un type de comportement"
+                                FontSize="12"
+                                TextColor="Red"
+                                IsVisible="{Binding TypeError}"/>
+                        </VerticalStackLayout>
+
+                        <!-- Commentaire -->
+                        <VerticalStackLayout>
+                            <Label Text="Commentaire" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
+                            <Entry Text="{Binding Description, Mode=TwoWay, TargetNullValue=''}" 
+                                   FontSize="16" 
+                                   TextColor="Black" 
+                                   Placeholder="(facultatif)"/>
+                        </VerticalStackLayout>
+
+                        <!-- sortie de l'animal -->
+                        <HorizontalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
+                            <CheckBox IsChecked="{Binding IsAnimalOut}" HorizontalOptions="Center" />
+                            <Label Text="Sortie de l'animal" FontSize="14" TextColor="Gray" HorizontalOptions="Center" VerticalOptions="Center" />
+                        </HorizontalStackLayout>
+
+                    </VerticalStackLayout>
+                </VerticalStackLayout>
+            </ScrollView>
+            <StackLayout
+                Margin="10"
+                HorizontalOptions="CenterAndExpand"
+                Orientation="Horizontal"
+                VerticalOptions="FillAndExpand">
+
+                <Button 
+                    Text="Enregistrer"
+                    Command="{Binding CreateBehaviourCommand}"
+                    Style="{StaticResource btnNormal}"
+                    IsEnabled="{Binding IsFormValid}"
+                    VerticalOptions="End"/>
+            </StackLayout>
+        </StackLayout>
+        <Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}">
+            <Border StrokeThickness="0"
+                            Background="Black"
+                            Opacity="0.5"
+                            Padding="20"
+                            WidthRequest="160"
+                            HeightRequest="160"
+                            HorizontalOptions="Center"
+                            VerticalOptions="Center"
+                            StrokeShape="RoundRectangle 20">
+
+                <VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center">
+                    <ActivityIndicator IsRunning="True" Color="White" />
+                    <Label Text="Chargement..."
+                            FontSize="14"
+                            TextColor="white"
+                            HorizontalOptions="Center"/>
+                </VerticalStackLayout>
+            </Border>
+        </Grid>
+    </Grid>
+
+</ContentPage>
\ No newline at end of file
diff --git a/GES_PAC/View/CreateBehaviourView.xaml.cs b/GES_PAC/View/CreateBehaviourView.xaml.cs
new file mode 100644
index 0000000..3183878
--- /dev/null
+++ b/GES_PAC/View/CreateBehaviourView.xaml.cs
@@ -0,0 +1,13 @@
+using GES_PAC.ViewModel;
+
+namespace GES_PAC.View
+{
+    public partial class CreateBehaviourView
+    {
+        public CreateBehaviourView()
+        {
+            InitializeComponent();
+            BindingContext = new CreateBehaviourViewModel();
+        }
+    }
+}
\ No newline at end of file
diff --git a/GES_PAC/View/CreateMeasureView.xaml b/GES_PAC/View/CreateMeasureView.xaml
index 4ce93a0..66bf3cb 100644
--- a/GES_PAC/View/CreateMeasureView.xaml
+++ b/GES_PAC/View/CreateMeasureView.xaml
@@ -120,7 +120,7 @@
                     Text="Comportements"
                     BackgroundColor="Orange"
                     TextColor="White"
-                    Command="{Binding ComportementsCommand}"
+                    Command="{Binding BehaviourCommand}"
                     Style="{StaticResource btnNormal}"
                     VerticalOptions="End"
                     Margin="0,0,10,0"/>
diff --git a/GES_PAC/View/EnterAnimalView.xaml b/GES_PAC/View/EnterAnimalView.xaml
index 3448067..47a7fe6 100644
--- a/GES_PAC/View/EnterAnimalView.xaml
+++ b/GES_PAC/View/EnterAnimalView.xaml
@@ -23,8 +23,8 @@
                         <VerticalStackLayout>
 
                             <Label Text="Numéro RFID" FontSize="14" TextColor="Gray" FontAttributes="Bold"/>
-                            <Entry Text="{Binding NumRFID}" FontSize="16" TextColor="Black" Placeholder="04 9C 64 D2 45 2B 80"/>
-                            <Label Text="Min. 5 caractères"
+                            <Entry Text="{Binding NumRFID}" FontSize="16" TextColor="Black" Placeholder="12345" Keyboard="Numeric"/>
+                            <Label Text="Min. 5 chiffres"
                                 FontSize="12"
                                 TextColor="Red"
                                 IsVisible="{Binding NumRFIDError}"/>
diff --git a/GES_PAC/ViewModel/ChambersViewModel.cs b/GES_PAC/ViewModel/ChambersViewModel.cs
index b6a1c96..466ba4f 100644
--- a/GES_PAC/ViewModel/ChambersViewModel.cs
+++ b/GES_PAC/ViewModel/ChambersViewModel.cs
@@ -17,10 +17,10 @@ namespace GES_PAC.ViewModel
         #endregion
 
         #region Propriétés
-
-        public Dictionary<int, int> NumberMeasure { get; set; }
-        public ObservableCollection<Color> ChamberColors { get; } = [];
-        public ObservableCollection<int> ChamberNumbers { get; } = [];
+        public ObservableCollection<Color> ChamberColors { get; set; } = [];
+        public ObservableCollection<int> ChamberNumbers { get; set; } = [];
+        public ObservableCollection<bool> ChamberIsIn { get; set; } = [];
+        public Serie CurrentSet { get; set; }
 
         #endregion
 
@@ -36,7 +36,7 @@ namespace GES_PAC.ViewModel
             JourneeViewModel.Instance.Journees.Add(newDay);
             //ONLY FOR TESTS
 
-            NumberMeasure = JourneeViewModel.Instance.GetCurrentDay().GetCurrentSet().GetMeasureNumber();
+            CurrentSet = JourneeViewModel.Instance.GetCurrentSet();
             UpdateChamberDatas();
 
             OnClickChamberCommand = new Command<string>(async (idStr) =>
@@ -53,7 +53,7 @@ namespace GES_PAC.ViewModel
             if (IsBusy) return;
             IsBusy = true;
 
-            if (!NumberMeasure.ContainsKey(id))
+            if (CurrentSet.GetMeasureNumberByNumeroBoite(id) == 0)
                 await Shell.Current.GoToAsync($"{nameof(EnterAnimalView)}?chamberId={id}");
             else
                 await Shell.Current.GoToAsync($"{nameof(CreateMeasureView)}?chamberId={id}");
@@ -63,11 +63,15 @@ namespace GES_PAC.ViewModel
 
         private void UpdateChamberDatas()
         {
-            ChamberColors.Clear();
+            ChamberIsIn = JourneeViewModel.Instance.GetCurrentSet().GetIsOutDatas();
             for (int i = 1; i <= 12; i++)
             {
-                int count = NumberMeasure.TryGetValue(i, out var val) ? val : 0;
-                ChamberColors.Add(count > 0 ? Colors.LightGreen : Colors.White);
+                bool hasBehaviour = CurrentSet.GetHasBehaviourByNumeroBoite(i);
+                int count = CurrentSet.GetMeasureNumberByNumeroBoite(i);
+                if (hasBehaviour)
+                    ChamberColors.Add(Colors.Yellow);
+                else
+                    ChamberColors.Add(count > 0 ? Colors.LightGreen : Colors.White);
                 ChamberNumbers.Add(count);
             }
         }
diff --git a/GES_PAC/ViewModel/CreateBehaviourViewModel.cs b/GES_PAC/ViewModel/CreateBehaviourViewModel.cs
new file mode 100644
index 0000000..d9c70f1
--- /dev/null
+++ b/GES_PAC/ViewModel/CreateBehaviourViewModel.cs
@@ -0,0 +1,112 @@
+using GES_PAC.Model;
+using GES_PAC.View;
+using System.Collections.ObjectModel;
+using System.Windows.Input;
+
+namespace GES_PAC.ViewModel
+{
+    [QueryProperty(nameof(ChamberId), "chamberId")]
+    public class CreateBehaviourViewModel : BaseViewModel
+    {
+
+        #region Attributs
+        private int _chamberId;
+        private TypeComportement _selectedType;
+        private string _description;
+        private bool _isFormValid;
+        private bool _isAnimalOut;
+        #endregion
+
+        #region Commandes
+        public ICommand CreateBehaviourCommand { get; }
+        #endregion
+
+        #region Propriétés
+        public int ChamberId
+        {
+            get => _chamberId;
+            set
+            {
+                _chamberId = value;
+                OnPropertyChanged();
+                OnPropertyChanged(nameof(Titre));
+            }
+        }
+        public ObservableCollection<TypeComportement> TypeComp { get; }
+        public TypeComportement SelectedType
+        {
+            get => _selectedType;
+            set
+            {
+                _selectedType = value;
+                OnPropertyChanged();
+                ValidateForm();
+            }
+        }
+        public string Description
+        {
+            get => _description;
+            set
+            {
+                _description = value;
+                OnPropertyChanged();
+                ValidateForm();
+            }
+        }
+        public bool IsAnimalOut
+        {
+            get => _isAnimalOut;
+            set => SetProperty(ref _isAnimalOut, value);
+        }
+
+        public bool IsFormValid
+        {
+            get => _isFormValid;
+            set
+            {
+                _isFormValid = value;
+                OnPropertyChanged();
+            }
+        }
+        public string Titre => $"Comportement chambre {ChamberId}";
+
+        public bool TypeError { get; private set; } = true;
+        #endregion
+
+        #region Constructeurs
+        public CreateBehaviourViewModel()
+        {
+            CreateBehaviourCommand = new Command(async () => await CreateBehaviour());
+
+            TypeComp = new ObservableCollection<TypeComportement>(TypeComportement.All);
+        }
+        #endregion
+
+        #region Méthodes
+        private async Task CreateBehaviour()
+        {
+            if (IsBusy) return;
+            IsBusy = true;
+
+            var date = DateTime.Now;
+            var set = JourneeViewModel.Instance.GetCurrentSet();
+            var newBehaviour = new Comportement(date, SelectedType, Description);
+            set.AddBehaviour(newBehaviour, ChamberId, IsAnimalOut);
+
+            await Shell.Current.GoToAsync(nameof(ChambersView));
+            IsBusy = false;
+        }
+
+        private void ValidateForm()
+        {
+            TypeError = SelectedType == null;
+
+            OnPropertyChanged(nameof(TypeError));
+
+            IsFormValid = !TypeError;
+
+            (CreateBehaviourCommand as Command)?.ChangeCanExecute();
+        }
+        #endregion
+    }
+}
diff --git a/GES_PAC/ViewModel/CreateMeasureViewModel.cs b/GES_PAC/ViewModel/CreateMeasureViewModel.cs
index 1710eb8..1aa975c 100644
--- a/GES_PAC/ViewModel/CreateMeasureViewModel.cs
+++ b/GES_PAC/ViewModel/CreateMeasureViewModel.cs
@@ -27,6 +27,7 @@ namespace GES_PAC.ViewModel
 
         #region Commandes
         public ICommand CreateMeasureCommand { get; }
+        public ICommand BehaviourCommand { get; }
         #endregion
 
         #region Propriétés
@@ -170,6 +171,7 @@ namespace GES_PAC.ViewModel
         public CreateMeasureViewModel()
         {
             CreateMeasureCommand = new Command(async () => await CreateMeasure());
+            BehaviourCommand = new Command(async () => await GoToBehaviour());
 
             HasLastMeasure = false;
         }
@@ -190,7 +192,16 @@ namespace GES_PAC.ViewModel
 
             IsBusy = false;
         }
+        private async Task GoToBehaviour()
+        {
+            if (IsBusy) return;
+            IsBusy = true;
 
+            await Shell.Current.GoToAsync($"{nameof(CreateBehaviourView)}?chamberId={ChamberId}");
+
+            IsBusy = false;
+        }
+        
         private void ValidateForm()
         {
             ConcO2Error = ConcO2 == null;
diff --git a/GES_PAC/ViewModel/CreateSetViewModel.cs b/GES_PAC/ViewModel/CreateSetViewModel.cs
index 10013a1..dfa03e3 100644
--- a/GES_PAC/ViewModel/CreateSetViewModel.cs
+++ b/GES_PAC/ViewModel/CreateSetViewModel.cs
@@ -110,7 +110,7 @@ namespace GES_PAC.ViewModel
 
         private void ValidateForm()
         {
-            DateMAJError = DateTimeMAJ > DateTime.Now;
+            DateMAJError = DateTimeMAJ > DateTime.Now.AddHours(-1);
             TemperatureError = Temperature == null;
             HumiditeError = Humidite == null;
             PressionError = Pression == null;
