/* styles.css */

/* Global Styles */
/* Réinitialisation des marges et paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Style général du body */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: #f4f4f4;
}

td.description {
  white-space: normal;
  word-break: break-word;
}

.section {
  padding: 20px;
}
/* Mise en forme de la section .hero */
.hero {
  padding-top: 20px; /* Réduit l'espace en haut de la section hero */
  padding-bottom: 20px; /* Réduit l'espace en bas de la section hero */
  min-height: 50px; /* Hauteur minimale de la section */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid #ddd;
}

/* Mise en forme de la navbar */
.navbar {
  background-color: #f8f9fa;
  border-bottom: 1px solid #ddd;
}

.navbar-nav {
  margin-left: 20px;
}

.nav-link {
  color: #333;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  text-transform: uppercase;
}

.nav-link:hover {
  color: #007bff;
}

/* Icônes sociales dans la nav */
.social-icons a {
  color: #333;
  font-size: 1.5rem;
  margin-right: 15px;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #007bff;
}
#categories img {
  transition: transform 0.8s ease;
}

#categories img:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#contact {
  background-color: #f8f9fa;
}
#notification {
  position: fixed; /* Fixer la position */
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999; /* Toujours au-dessus */
  background-color: #013cff; /* Couleur de fond pour la notification */
  color: white; /* Couleur du texte */
  padding: 15px; /* Espace autour du texte */
  border-radius: 5px; /* Coins arrondis */
  font-size: 16px; /* Taille du texte */
  display: none; /* Commence cachée */
}

/* Thème sombre */
body.dark-theme {
  background-color: rgb(56, 52, 52);
  color: white;
}
body.dark-theme .border {
  border-color: #555 !important; /* Gris foncé */
}
body.dark-theme .text-muted {
  color: #ffffff !important; /* Surcharge la classe Bootstrap */
}
body.dark-theme .navbar-toggler {
  border-color: white;
}

body.dark-theme .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
body.dark-theme .navbar {
  background-color: #333;
  color: white;
  border-color: #555 !important; /* Gris foncé */
}
body.dark-theme .nav-link {
  color: white;
}
body.dark-theme .navbar .btn {
  color: white;
}
body.dark-theme .social-icons a i {
  color: white;
}
body.dark-theme .social-icons a:hover i {
  color: #0d6efd;
}
body.dark-theme #hero {
  background-color: #333 !important;
  border-color: #555 !important; /* Gris foncé */
}
body.dark-theme .btn-primary {
  background-color: rgb(44, 41, 41) !important;
  border-color: #555 !important;
  color: white !important;
}
body.dark-theme #categories {
  background-color: #333;
  color: white;
}
body.dark-theme #categories .col-md-4 {
  background-color: #333;
}
body.dark-theme #plats .col-md-3 {
  background-color: rgb(56, 52, 52);
  border-color: #555 !important; /* Gris foncé */
}
body.dark-theme #plats .btn {
  background-color: #555 !important; /* Bouton primaire gris sombre */
  border-color: #555 !important; /* Bordure bouton */
}
body.dark-theme #contact {
  background-color: #333; /* Fond sombre */
  color: #f8f9fa; /* Texte clair */
  border: 1px solid #444; /* Bordure sombre */
}
body.dark-theme #contact .form-label {
  color: #f8f9fa; /* Texte des labels clair */
}
body.dark-theme #contact .form-control {
  background-color: #444; /* Fond des champs de formulaire sombre */
  border: 1px solid #555; /* Bordure sombre */
  color: #f8f9fa; /* Texte dans les champs clair */
}
body.dark-theme #contact .btn-primary {
  background-color: #555; /* Bouton primaire gris sombre */
  border-color: #555; /* Bordure bouton */
}

body.dark-theme #footer {
  background-color: rgb(56, 52, 52);
}

body.dark-theme #panier {
  background-color: #555;
}
body.dark-theme .panier-header h5 {
  color: white;
}
body.dark-theme #panier-total {
  color: white;
}
body.dark-theme #open-panier {
  background-color: #555;
}
body.dark-theme #panier .panier-items .item {
  background-color: #555;
}
body.dark-theme #panier .panier-items span {
  color: white;
}

body.dark-theme #notification {
  background-color: #555;
  border: #333;
}
body.dark-theme #example {
  background-color: #555;
  border: #333;
}
body.dark-theme #example th{
  background-color: #555;
  border: #3b3838;
}
/* Mode clair */
body.light-theme .navbar {
  background-color: #f8f9fa;
}
body.light-theme #contact,
#categories {
  background-color: #f8f9fa; /* Fond clair */
  color: #212529; /* Texte sombre */
  border: 1px solid #ddd; /* Bordure claire */
}

body.light-theme #contact .form-label {
  color: #212529; /* Texte des labels clair */
}

body.light-theme #contact .form-control {
  background-color: #ffffff; /* Fond des champs de formulaire clair */
  border: 1px solid #ddd; /* Bordure claire */
  color: #212529; /* Texte dans les champs clair */
}

body.light-theme #contact .btn-primary {
  background-color: #007bff; /* Bouton primaire bleu clair */
  border-color: #007bff; /* Bordure bouton */
}
body.light-theme .modal-body,
.modal-header {
  background-color: white;
}
body.light-theme .modal-footer .btn-secondary {
  background-color: #0474f5;
}

/* Panier stylisé */
#panier {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: white;
  border: 1px solid #ddd;
  padding: 20px;
  width: 350px;
  height: 450px;
  display: none;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  z-index: 999;
  overflow: hidden;
}

.panier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 2px solid #f1f1f1;
  padding-bottom: 10px;
}

.panier-header h5 {
  font-size: 1.25rem;
  color: #333;
}

.panier-header button {
  background-color: #f44336;
  border: none;
  color: white;
  border-radius: 5px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
}

.panier-header button:hover {
  background-color: #d32f2f;
}

.panier-items {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 10px;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px;
  background-color: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.item .name {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}

.item .price {
  color: #4caf50;
  font-weight: bold;
}

.item .quantity {
  width: 50px;
  text-align: center;
  padding: 5px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ddd;
  background-color: #f1f1f1;
}

.item .quantity:focus {
  outline: none;
  border-color: #4caf50;
}

#panier-total {
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 15px;
  color: #333;
}

#clear-cart,
#checkout {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  font-size: 1.1rem;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

#clear-cart {
  background-color: #f44336;
  color: white;
}

#clear-cart:hover {
  background-color: #d32f2f;
}

#checkout {
  background-color: #4caf50;
  color: white;
  margin-top: 10px;
}

#checkout:hover {
  background-color: #388e3c;
}

/* Bouton pour ouvrir le panier */
#open-panier {
  position: fixed;
  bottom: 20px;
  left: 20px;
  padding: 12px 20px;
  background-color: #0474f5;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

#open-panier:hover {
  background-color: #0474f593;
}

#open-panier:focus {
  outline: none;
}

/* Responsive - Ajustements pour les écrans moyens (tablettes) */
@media (max-width: 768px) {
  .hero {
    padding-top: 10px; /* Réduit encore l'espace en haut pour les écrans moyens (tablettes) */
    padding-bottom: 10px; /* Réduit encore l'espace en bas pour les écrans moyens (tablettes) */
    min-height: 100px; /* Hauteur minimale réduite sur les écrans moyens */
  }
}

/* Responsive - Ajustements pour les petits écrans (mobiles) */
@media (max-width: 576px) {
  .hero {
    padding-top: 5px; /* Réduit l'espace en haut pour les petits écrans (mobiles) */
    padding-bottom: 5px; /* Réduit l'espace en bas pour les petits écrans (mobiles) */
    min-height: 80px; /* Hauteur minimale réduite pour les mobiles */
  }

  .navbar-nav {
    text-align: center; /* Centre les liens de la nav sur les petits écrans */
  }

  .navbar-toggler {
    border-color: #007bff;
  }

  .social-icons {
    justify-content: center;
  }
}

/* Navbar fixe en haut de l'écran */
.navbar.fixed-top {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

/* Espacement dans la section .search */
.search input {
  max-width: 300px;
}

/* Espacement pour le footer */
footer {
  background-color: #fff;
  padding: 20px;
  text-align: center;
}

/* Mise en forme des sections de contenu */
section {
  padding: 40px 0;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

section p {
  font-size: 1rem;
}

/* Mise en forme des colonnes dans les sections */
.row {
  display: flex;
  justify-content: space-around;
}

.col-md-3,
.col-md-4 {
  padding: 15px;
  text-align: center;
}

/* Sections spécifiques de la page */
.blog .col-md-4,
.categories .col-md-3 {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
}

/* Modifications des couleurs pour les liens */
a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
