<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="16dp"
        android:layout_marginRight="16dp"

        android:layout_marginTop="8dp"
        android:layout_marginBottom="8dp"

        android:foreground="?android:attr/selectableItemBackground"
        app:cardCornerRadius="10dp"
        app:layout_constraintBottom_toBottomOf="parent"
        tools:ignore="MissingConstraints"
        tools:layout_editor_absoluteX="0dp"
        android:clipChildren="false"
        android:clipToPadding="false">

        <RelativeLayout
            android:id="@+id/relativeLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="16dp">

            <!-- Initialement invisible -->

            <ImageView
                android:id="@+id/projectImage"
                android:layout_width="180dp"
                android:layout_height="120dp"
                android:scaleType="centerCrop"
                android:src="@drawable/not_found"
                app:layout_constraintEnd_toEndOf="parent"
                tools:layout_editor_absoluteY="7dp" />

            <LinearLayout
                android:layout_width="152dp"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintEnd_toStartOf="@+id/projectImage"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:id="@+id/projectTitle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Project Title"
                    android:textSize="18sp"
                    android:textStyle="bold"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/projectDescription"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Description"
                    android:textSize="12sp" />
            </LinearLayout>
            <!-- Ajouter d'autres vues comme une image ou une description -->
        </androidx.constraintlayout.widget.ConstraintLayout>

        </RelativeLayout>
    </androidx.cardview.widget.CardView>



    <TextView
        android:id="@+id/projectBadge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/rounded_badge"
        android:padding="4dp"
        android:text="En cours"
        android:textColor="@android:color/white"
        android:textSize="12sp"
        android:layout_gravity="end|top"
        android:translationX="-1dp"
        android:translationY="5dp"
        android:elevation="8dp"
        />
</FrameLayout>