<div class="container position-relative shadow p-0 mb-5 bg-body rounded rounded  m-5 rounded-top "
  style="width: 23rem;">
    <img class="card-img-top " src="assets/ImagesRestos/photo.jpg" alt="Card image cap">
      <div class="rond position-absolute">
        <app-icon class="heart"
        [iconName]="restaurant.restauLike ? 'heart-fill' : 'heart'"
        [iconColor]="'#e35d6a'"
        (click)="onClickLike()"></app-icon></div>
      <div class="card-body rounded-bottom">
        <h3 class="titre-resto d-flex justify-content-center d-flex align-items-center" style="font-size: 24px;">
          {{restaurant.nom }}</h3>

        <div class="accordion  " id="accordionExample">
          <h2 class="accordion-header pt-1" id="headingOne">
              <button class="btn shadow accordion-button collapsed  ps-5 pe-5 " type="button" data-bs-toggle="collapse"
              [attr.data-bs-target]="'#restaurant'+ restaurant.id" aria-expanded="true" aria-controls="collapseOne">
              PLUS D'INFOS</button>
          </h2>
        <div id="restaurant{{restaurant.id}}" class="accordion-collapse collapse" aria-labelledby="headingOne"
             data-bs-parent="#accordionExample">
          <div class=" body accordion-body">
          <strong>This is the first item's accordion body.</strong>
          <div class="star-icon d-flex justify-content-flex-start d-flex align-items-center pt-5 ">
              <ul class="avis-star d-flex flex-row  ps-1 pt-3 pe-0 pb-2 mb-0  ">
                <li class="star pe-2"><i class="bi bi-star-fill"></i></li>
                <li class="star pe-2"><i class="bi bi-star-fill"></i></li>
                <li class="star pe-2"><i class="bi bi-star-fill"></i></li>
                <li class="star pe-2"><i class="bi bi-star-fill"></i></li>
                <li class="star"><i class="bi bi-star-fill"></i></li>
              </ul>
            <span class="ps-3 mt-3 " style="font-size: 1.1em; color:#545454">5/5</span>
          </div>
          <div>
            <span class="categorie ps-1 pe-4" style="font-style: italic;" *ngFor="let categorie of restaurant.typerestaus">{{ categorie.libelle }}</span>
          </div>
          <div class="trait-rouge pt-3"></div>
          <div class="infos  pt-2" style="color:#545454">

              <i class="fas fa-walking ps-2 pe-2" style="color:#a8a8a8"></i>
              <span class="categorie pe-2" style="font-weight: bold;">{{distance}}m</span>

              <div class="d-inline-flex align-items-center" *ngIf="restaurant.prix != null; else noPrice">
                <i class="fas fa-euro-sign ps-2 pe-2" style="color:#a8a8a8"></i>
                <span class="prix" style="font-weight: bold;">{{ priceRef[restaurant.prix] }}</span>
              </div>

              <ng-template #noPrice>
                <i class="fas fa-euro-sign ps-1 " style="color:#a8a8a8"></i>
                <div class="d-inline-flex">
                  <p class="description pt-3 ps-1  " style="font-size:1.9vh ;color:#545454">{{ priceRef[0] }} </p>
                </div>
              </ng-template>
           
            <div class="d-inline-flex" *ngIf="restaurant.website; else noWebsite">
              <p class="description pt-3 ps-2 pe-1"><i class="bi bi-globe2 ps-2 pe-2" style="color:#a8a8a8"></i>
                <a href="{{restaurant.website}}" class="description text-decoration-none pe-1" style="font-style: italic;font-weight: bold; color:#545454">Site Web</a>
              </p>
            </div>
            <!-- le else de notre *ngIf plus haut-->
            <ng-template #noWebsite>
              <i class="bi bi-globe2 ps-3 pe-1" style="color:#a8a8a8"></i>
              
                <p class="d-inline-flex description pt-3 " style="font-size:1.9vh ;color:#545454">Indisponible </p>
              
            </ng-template>
            <!--  ------------------------------------  -->
          </div>


          <div class="trait-rouge pt-2 pb-0"></div>
            <div class="critere ps-1 pt-3">
                
              <div class="d-inline-flex " *ngIf="restaurant.surPlace != null else noInfosSurPlace">
                  <span class="sur-place pe-3" style="color:#545454">Sur place :</span>            
                  <app-icon 
                    [iconName]="restaurant.surPlace ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-2 pt-1 '"
                    [iconColor]="restaurant.surPlace ? '#4ECB71' : '#ED2F2F'"
                  ></app-icon>
                </div>
                <ng-template #noInfosSurPlace>
                  <span class="d-flex" style="color:#545454">Sur place :</span> 
                  <p style="font-size:1.9vh ;color:#545454">Indisponible.</p>
                </ng-template>
                
                <div class="d-inline-flex " *ngIf="restaurant.aEmporter != null else noInfosAEmporter">
                  <span class="a-emporter pe-2 ps-4 " style="color:#545454">A emporter :</span>  
                  <app-icon 
                    [iconName]="restaurant.aEmporter ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-2 pt-1'"
                    [iconColor]="restaurant.aEmporter ? '#4ECB71' : '#ED2F2F'"
                  ></app-icon>
                </div>
                <ng-template #noInfosAEmporter>
                  <span class="d-flex a-emporter pt-2 " style="color:#545454">A emporter :</span> 
                  <p style="font-size:1.9vh ;color:#545454">Indisponible.</p>
                </ng-template>
            </div>
          <div class="trait-rouge pt-3"></div>
          <div class="critere d-flex justify-content-center ps-1 pt-3 pb-3">
            <span class="acces-pmr pe-1" style="color:#545454">Accès PMR :</span>

            <div class="d-inline-flex " *ngIf="restaurant.accesPMR != null else noAccesPMR">
              <app-icon 
              [iconName]="restaurant.accesPMR ? 'bi bi-check-square-fill' : 'bi bi-x-square-fill ps-1 pt-1'"
              [iconColor]="restaurant.accesPMR ? '#4ECB71' : '#ED2F2F'"
              ></app-icon>
            </div>
            <!-- le else de notre *ngIf plus haut-->
            <ng-template #noAccesPMR>
             <p class="ps-2"style="font-size:1.9vh ;color:#545454">Indisponible.</p>
            </ng-template>
            <!--  ------------------------------------  -->
          </div>
          <div class="reserver pt-2">
            <button type="button" class="button">Réserver</button>
          </div>
        </div>

      </div>

    
</div>
