
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    /* Position de départ : en bas et invisible */
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    z-index: 1001; /* Augmenté pour être au-dessus de tout */
    background-color: white;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    width: 95%;
    max-width: 450px;
    /* Animation de transition */
    transition: transform 0.4s ease-out, opacity 0.4s ease-out, visibility 0.4s ease-out;
  }
  
  .modal-content {
    position: relative;
    max-height: 95vh;
    overflow-y: auto;
  }
  
  /* Classe pour rendre la modale visible */
  .modal.visible {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  
  .close-button {
    position: absolute;
    right: 10px;
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  .modal input,
  .modal textarea,
  .modal select {
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 55%;
    max-width: 250px;
  }
  
  .comp{
    width: 100%;
    display: flex ;
    justify-content: space-between;
    align-items: center;
  }
  
  
  
  .modal button {
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    background-color: #ff6600;
    color: white;
    cursor: pointer;
  }

  .modal .miniButton{
    padding: 0 8px;
  }
  
  
  @media (width < 568px){
    .comp{
      width: 100%;
      display: flex ;
      justify-content: space-between;
      align-items: center;
      margin: 5px 0;
    }
  
    .modal input,
    .modal textarea {
      margin: 10px 0;
      padding: 8px;
      border: 1px solid #ccc;
      border-radius: 4px;
      width: 50%;
      max-width: 200px;
    }
  }
  
  .modal details{
    width: 100%;
    color: #614fff;
    
    text-align: justify;
    font-size: 12px;
  }
  
  .modal details summary{
    cursor: pointer;
    margin: 10px 0;
    width: 100%;
    text-align: center;
  }
  
  .modal details p{
    color: #212529;
  }
  
  .modal details {
    color: blue;
  }
  
  .how-it-works ol {
    list-style: none; /* Supprime les numéros par défaut */
    padding-left: 0;
    margin-top: 1rem;
  }
  
  .how-it-works li {
    display: flex;
    align-items: flex-start; /* Aligne l'icône avec le haut du texte */
    gap: 10px; /* Espace entre l'icône et le texte */
    margin-bottom: 1rem;
    color: black;
  }
  
  .how-it-works li i {
    font-size: 1.5rem; /* Taille de l'icône */
    color: var(--primary-color); /* Couleur de l'icône */
    margin-top: 2px; /* Ajustement vertical si nécessaire */
  }
  
  .how-it-works li div {
    flex: 1; /* Le texte prend l'espace restant */
  }
  
  /*************************************************Message de confirmation**************************************/
  
  
  
  /* Styles pour la fenêtre modale */
  .modalPosition {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1002; /* Augmenté pour être au-dessus de tout */
    width: 300px;
    text-align: center;
  }
  
  /* Arrière-plan semi-transparent */
  .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001; /* Augmenté pour être au-dessus de la top-bar */
    /* Cacher par défaut pour l'animation */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  }
  
  /* Style des boutons */
  .modalPosition-content button {
    margin: 10px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
  }
  
  #callInstead {
    background-color: #4CAF50;
    color: white;
  }
  
  #allowLocation  {
    background-color: #f44336;
    color: rgb(255, 255, 255);
  }
  
  .hidden {
    display: none;
  }
  
  /* Classe pour rendre le backdrop visible avec une transition */
  .modal-backdrop.visible {
    visibility: visible;
    opacity: 1;
  }
  
  /**************************************** autentification *************************/
  
  
  .modal-content-auth form{
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
  }
  
  .modal-content-auth form textarea{
    padding: 5px;
    border: none;
    border-bottom: #333 solid 1px;
    background-color: rgb(0, 0, 0,.1);
    color: #fff;
  }
  
  
  
  
  .modal-content-auth form *{
    margin: 8px 0;
    width: 90%;
    border: none;
  }
  
  .modal-content-auth form input,.modal-content-auth form select{
  
    border-bottom: solid black .5px;
  }
  
  
  
  .modal-content-auth form .soumetre{
    border: black solid .5px;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: white;
    width: 95%;
    cursor: pointer;
    border: none;
    padding: 10px;
    transition: all .3s;
  }
  
  .modal-content-auth form .reset:hover{
    background-color: rgb(230, 228, 228);
  }
  
  .modal-content-auth form .reset{
    border: black solid .5px;
    border-radius: 5px;
    background-color: white;
    color: rgb(0, 0, 0);
    width: 95%;
    cursor: pointer;
    border: none;
    padding: 10px;
    transition: all .3s;
  }
  
  .modal-content-auth form .soumetre:hover{
    background-color: var(--button-hover-color);
  }
  
  
  
  .modal-content-auth form span{
    display: flex;
    border: none;
  }
  
  .modal-content-auth form span *{
    width: 50%;
    margin-right:5px ;
  }
  
  .modal-content-auth form span p{
    border:none;
  }
  
  
  .modal-auth {
    /* Remplacer le display par l'opacité pour l'animation */
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 1002; /* Augmenté pour être au-dessus de tout */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex; /* Utiliser flex pour centrer */
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
  }
  
  /* Classe pour rendre la modale visible */
  .modal-auth.visible {
    visibility: visible;
    opacity: 1;
  }
  
  
  .modal-content-auth {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
    border-radius: 5px;
    transform: translateY(-20px); /* Position de départ pour l'animation */
    transition: transform 0.3s ease-out;
  }
  
  /* Quand la modale est visible, le contenu glisse à sa place */
  .modal-auth.visible .modal-content-auth {
    transform: translateY(0);
  }
  
  .close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }
  
  .close-button:hover,
  .close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
  
  .close-button2 {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
  }
  
  .close-button2:hover,
  .close-button2:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }
  
  .othof{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    gap: 30px;
  }
  
  .nom_pub{
    display: flex;
    align-items: center;
  }
  
  .nom_pub svg{
    height: 20px;
  }
  
  .othof button{
    width: 150px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    margin: 4px 0;
    cursor: pointer;
    transition: all .4s;
  }
  
  .othof button{
    background-color: var(--primary-color);
    color: white;
  }
  
  .othof a:nth-child(2) button{
    background-color: white;
    color: black;
  }

/* Styles pour les articles du panier dans la modale de commande */
.cart-item-modal {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-modal span:first-child {
  font-weight: 500;
}

.quantity-controls {
  display: flex;
  align-items: center;
}

.quantity-controls input {
  width: 40px;
  text-align: center;
  border: 1px solid #ccc;
  margin: 0 5px !important; /* Override default margin */
  padding: 4px !important; /* Override default padding */
}

.quantity-btn, .remove-item-btn {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  width: 25px;
  height: 25px;
  font-weight: bold;
}

/* Conteneur des articles dans la modale */
#cartItemsContainer {
  max-height: 200px; /* Limite la hauteur pour les longs paniers */
  overflow-y: auto; /* Ajoute une barre de défilement si nécessaire */
  margin-bottom: 15px;
}

.cart-divider {
  border: none;
  border-top: 1px solid #eee;
  margin: 15px 0;
}

.info-link {
  display: block;
  text-align: center;
  margin: 10px 0;
  color: var(--primary-color);
  font-size: 0.9rem;
}

.total-price-modal {
  text-align: right;
  font-weight: bold;
  /* font-size: 1rem; */
  margin: 15px 0;
}

.restaurant-name-header {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}

/* Styles pour les messages dans la modale */
.message-display {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: center;
    display: none; /* Caché par défaut */
}

.success-message {
    background-color: #d4edda;
    color: #155724;
}
.error-message {
    background-color: #f8d7da;
    color: #721c24;
}

/* Styles pour la modale des variantes */
#variantsListContainer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
}

.variant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.variant-info h5 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.variant-info p {
    font-size: 0.9rem;
    color: #666;
}

.variant-action {
    display: flex;
    align-items: center;
    gap: 15px;
}

.variant-price {
    font-weight: 600;
    color: var(--primary-color);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Styles pour les boutons de confirmation dans la modale de profil */
.btn-submit {
    background-color: var(--primary-color, #42200b);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--button-hover-color, #2c1507);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
}