/* Styles pour l'administration du site Champagne Walter Devaugermé */

/* Variables de couleurs */
:root {
  --primary-color: #212529;
  --secondary-color: #6c757d;
  --accent-color: #9a8347;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --danger-color: #dc3545;
  --success-color: #198754;
  --sidebar-width: 250px;
  --sidebar-collapsed-width: 70px;
  --transition-speed: 0.3s;
}

/* Styles généraux */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
}

/* Page de connexion */
.login-container {
  margin-top: 80px;
  margin-bottom: 80px;
}

.login-logo {
  max-width: 100%;
  height: auto;
  max-height: 100px;
}

/* Layout principal */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--primary-color);
  color: white;
  position: fixed;
  height: 100%;
  overflow-y: auto;
  transition: width var(--transition-speed);
  z-index: 1000;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
  max-width: 100%;
  height: 50px;
  margin-bottom: 1rem;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin: 0;
  padding: 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-menu a span {
  display: none;
}

/* Main content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  transition: margin-left var(--transition-speed);
}

.main-content.expanded {
  margin-left: var(--sidebar-collapsed-width);
}

.main-content.login-page {
  margin-left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Top navbar */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #dee2e6;
}

/* Styles pour le badge de notifications sur "Commandes reçues" */
#ordersBadge {
  font-size: 0.65rem;
  padding: 0.25rem 0.4rem;
  min-width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Animation pour le badge de notification */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

#ordersBadge {
  animation: pulse 2s infinite;
}

.toggle-sidebar {
  background: none;
  border: none;
  color: var(--dark-color);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
}

.user-dropdown .dropdown-toggle {
  background: none;
  border: none;
  color: var(--champagne-blue);
  display: flex;
  align-items: center;
}

.user-dropdown .dropdown-toggle img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: 10px;
}

/* Breadcrumb navigation */
.breadcrumb-container {
  background-color: #f8f9fa;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
}

.breadcrumb {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.875rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding: 0 0.5rem;
  color: #6c757d;
}

.breadcrumb-item a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

.breadcrumb-item a:hover {
  color: #0056b3;
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
  font-weight: 500;
}

.breadcrumb-item i {
  margin-right: 0.25rem;
  font-size: 0.8rem;
}

/* Cards et conteneurs */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  margin-bottom: 1.5rem;
}

.card-header {
  background-color: var(--light-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  font-weight: 600;
}

/* Dashboard cards */
.dashboard-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.dashboard-card-link:focus-visible {
  outline: none;
}

.dashboard-card {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7f7f7 100%);
  border-radius: 0.5rem;
  border: 1px solid rgba(52, 58, 64, 0.18);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.dashboard-card-link:hover .dashboard-card,
.dashboard-card-link:focus-visible .dashboard-card {
  transform: translateY(-3px);
  border-color: rgba(154, 131, 71, 0.5);
  background: linear-gradient(180deg, #fffdfa 0%, #f2e9d6 100%);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.9) inset;
}

.dashboard-card i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.dashboard-card .new-order-icon {
  color: #28a745;
}

.dashboard-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.dashboard-card .count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Boutons personnalisés */
.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #8a7441;
  border-color: #8a7441;
}

.btn-outline-primary {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.table th {
  font-weight: 600;
  background-color: rgba(0, 0, 0, 0.03);
}

.table-admin th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.table-admin img.thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.badge-active {
  background-color: #28a745;
  color: white;
}

.badge-inactive {
  background-color: #dc3545;
  color: white;
}

/* Formulaires */
.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(154, 131, 71, 0.25);
}

.image-preview {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 10px;
}

/* Alertes */
.alert {
  transition: opacity 0.5s ease-out;
}

/* Alertes permanentes qui ne doivent pas disparaître */
.alert-permanent {
  transition: none !important;
  opacity: 1 !important;
}

/* Formulaire de connexion */
.login-card {
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem;
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo img {
  max-width: 200px;
}

/* Responsive - Optimisations mobiles améliorées */
@media (max-width: 768px) {
  /* Ajustement automatique du zoom pour le contenu */
  body {
    zoom: 0.85;
    -webkit-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
  }

  /* Masquer le breadcrumb sur mobile */
  .breadcrumb-container {
    display: none !important;
  }

  /* Sidebar mobile */
  .sidebar {
    width: 0;
    position: fixed;
    transform: translateX(-100%);
    transition: transform var(--transition-speed);
  }

  .sidebar.collapsed {
    width: var(--sidebar-width);
    transform: translateX(0);
  }

  /* Overlay pour fermer la sidebar sur mobile */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
  }

  .sidebar-overlay.show {
    display: block;
  }

  /* Main content mobile */
  .main-content {
    margin-left: 0;
    padding: 1rem;
  }

  .main-content.expanded {
    margin-left: 0;
  }

  /* Top navbar mobile - uniquement le bouton hamburger */
  .top-navbar {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    border-bottom: none;
  }

  .top-navbar h1 {
    display: none !important;
  }

  .toggle-sidebar {
    background: none;
    border: none;
    color: var(--dark-color);
    font-size: 1.5rem;
    padding: 0.75rem;
    margin: 0;
    cursor: pointer;
  }

  .user-dropdown {
    display: none !important;
  }

  /* Dashboard cards mobile */
  .dashboard-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .dashboard-card i {
    font-size: 2rem;
  }

  .dashboard-card .count {
    font-size: 1.5rem;
  }

  .dashboard-card h3 {
    font-size: 1rem;
  }

  /* Tables mobile */
  .table-responsive {
    font-size: 0.75rem;
  }

  .table th,
  .table td {
    padding: 0.25rem 0.15rem;
    white-space: nowrap;
    font-size: 0.7rem;
  }

  .table-admin img.thumbnail {
    width: 40px;
    height: 40px;
  }

  /* Formulaires mobile */
  .form-control,
  .form-select {
    font-size: 16px; /* Évite le zoom sur iOS */
  }

  /* Boutons mobile */
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  .btn-sm {
    padding: 0.25rem 0.4rem;
    font-size: 0.65rem;
  }

  /* Boutons dans les tableaux encore plus petits */
  .table .btn-sm {
    padding: 0.15rem 0.3rem;
    font-size: 0.6rem;
  }

  /* Cards mobile */
  .card {
    margin-bottom: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Actions rapides mobile */
  .col-6 .btn {
    padding: 1rem 0.5rem;
    font-size: 0.8rem;
  }

  .col-6 .btn i {
    font-size: 20px !important;
  }
}

/* Responsive - Tablettes */
@media (max-width: 992px) and (min-width: 769px) {
  .main-content {
    padding: 1.5rem;
  }

  .dashboard-card {
    padding: 1.25rem;
  }

  .table-responsive {
    font-size: 0.9rem;
  }
}

/* Responsive - Très petits écrans */
@media (max-width: 480px) {
  /* Zoom encore plus réduit pour très petits écrans */
  body {
    zoom: 0.75;
  }

  .main-content {
    padding: 0.75rem;
  }

  .top-navbar {
    margin-bottom: 0.75rem;
  }

  .top-navbar h1 {
    font-size: 1.1rem !important;
  }

  .dashboard-card {
    padding: 0.75rem;
  }

  .dashboard-card i {
    font-size: 1.75rem;
  }

  .dashboard-card .count {
    font-size: 1.25rem;
  }

  .dashboard-card h3 {
    font-size: 0.9rem;
  }

  .card-body {
    padding: 0.75rem;
  }

  .table th,
  .table td {
    padding: 0.2rem 0.1rem;
    font-size: 0.65rem;
  }

  .btn {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
  }

  .col-6 .btn {
    padding: 0.75rem 0.25rem;
    font-size: 0.75rem;
  }

  .col-6 .btn i {
    font-size: 18px !important;
  }

  /* Login mobile */
  .login-card {
    padding: 1.5rem;
    margin: 1rem;
  }

  .login-logo img {
    max-width: 150px;
  }
}

/* Optimisations pour le touch */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .sidebar-menu a,
  .dropdown-toggle {
    min-height: 44px; /* Taille minimale recommandée pour le touch */
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  /* Amélioration des zones de touch pour les liens */
  .sidebar-menu a {
    padding: 1rem;
  }

  .dashboard-card-link:hover .dashboard-card {
    transform: none; /* Désactiver les effets hover sur mobile */
  }
}

/* Styles supplémentaires pour les optimisations mobiles */

/* Amélioration des tables sur très petits écrans */
@media (max-width: 480px) {
  .table-responsive table {
    font-size: 0.75rem;
  }
}

/* Styles pour les éléments avec JavaScript activé */
.js-enabled .sidebar {
  transition: transform var(--transition-speed);
}

.js-enabled .mobile-optimized * {
  /* Réduire les animations sur mobile pour les performances */
  animation-duration: 0.2s !important;
  transition-duration: 0.2s !important;
}

/* Amélioration de l'accessibilité */
.table tbody tr:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
  background-color: rgba(154, 131, 71, 0.1);
}

/* Validation des formulaires */
.form-control.is-invalid {
  border-color: var(--danger-color);
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
  border-color: var(--success-color);
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* Amélioration des boutons de confirmation */
.btn-danger:focus,
[data-confirm]:focus {
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.5);
}

/* Styles pour les modales sur mobile */
@media (max-width: 768px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-header,
  .modal-footer {
    padding: 0.75rem 1rem;
  }
}

/* Amélioration des dropdowns sur mobile */
@media (max-width: 768px) {
  .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
  }

  .dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* Indicateurs de chargement */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn .fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Amélioration de la lisibilité sur mobile */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    line-height: 1.3;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .btn {
    border-radius: 0.375rem;
  }
}

/* Styles pour les alertes améliorées */
.alert {
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Amélioration des badges */
.badge {
  font-size: 0.75em;
  padding: 0.375em 0.5em;
  border-radius: 0.25rem;
}

/* Ajout du style pour les options par défaut dans les listes déroulantes */
.placeholder-option,
select option[value=""] {
  color: #6c757d; /* Couleur gris clair de Bootstrap */
  font-style: italic;
}

/* Bouton nouvelle commande */
.btn-new-order {
  background-color: #28a745 !important;
  color: white !important;
  border-radius: 8px;
  margin: 0.5rem 1rem;
  padding: 0.75rem 1rem !important;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s;
  border: none !important;
  display: block !important;
  text-decoration: none !important;
}

.btn-new-order:hover {
  background-color: #218838 !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
  text-decoration: none !important;
}

.btn-new-order:focus,
.btn-new-order:active {
  background-color: #1e7e34 !important;
  color: white !important;
  text-decoration: none !important;
}

.btn-new-order i {
  margin-right: 8px;
  font-size: 1.1em;
}

/* En-têtes de sections du menu */
.menu-header {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1rem 1rem 0.5rem 1rem !important;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-header:first-child {
  margin-top: 0.5rem;
  border-top: none;
}

/* Section spéciale pour le bouton nouvelle commande */
.menu-section {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-section:last-child {
  border-bottom: none;
}

/* Styles pour les accordéons du menu */
.menu-accordion {
  margin: 0;
  padding: 0;
}

.menu-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem !important;
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none !important;
  transition: all 0.3s;
  cursor: pointer;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white !important;
  text-decoration: none !important;
}

.toggle-icon {
  transition: transform 0.3s;
  font-size: 0.8em;
  margin-left: auto;
}

.menu-toggle.active .toggle-icon {
  transform: rotate(180deg);
}

.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: rgba(0, 0, 0, 0.2);
}

.submenu.open {
  max-height: 300px;
  transition: max-height 0.3s ease-in;
}

.submenu li {
  margin: 0;
  padding: 0;
}

.submenu a {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 0.5rem 2rem !important;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.9em;
}

.submenu a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white !important;
  text-decoration: none !important;
}

/* Styles pour les éléments actifs du menu */
.submenu a.active {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #28a745 !important;
  font-weight: 600;
  border-left: 3px solid #28a745;
  padding-left: 1.5rem !important;
}

.btn-new-order.active {
  background-color: #1e7e34 !important;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
  transform: translateY(-1px);
}

.submenu i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
  font-size: 0.9em;
}

/* Section déconnexion */
.menu-logout {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-logout a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #dc3545 !important;
  text-decoration: none;
  transition: all 0.3s;
}

.menu-logout a:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545 !important;
  text-decoration: none !important;
}

.menu-logout i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Styles uniformes pour les champs et placeholders de l'administration */

/* Titres de champs en gras noir - Application étendue */
.form-label,
label,
.control-label,
.form-group label,
.mb-3 label,
.form-floating label {
  font-weight: bold !important;
  color: #000000 !important;
}

/* Champs de formulaire - Styles de base uniformes */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
textarea,
select {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

/* Placeholders en italique et gris à peine visible - Application étendue */
.form-control::placeholder,
.form-select::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder,
select option[value=""]::placeholder {
  font-style: italic !important;
  color: #e0e0e0 !important;
  opacity: 1;
}

/* Style pour les champs vides avec placeholder dynamique */
.form-control[style*="italic"],
input[style*="italic"],
textarea[style*="italic"] {
  font-style: italic !important;
  color: #e0e0e0 !important;
}

/* Assurer que le texte saisi reste normal */
.form-control:not(:placeholder-shown),
input[type="text"]:not(:placeholder-shown),
input[type="email"]:not(:placeholder-shown),
input[type="password"]:not(:placeholder-shown),
input[type="number"]:not(:placeholder-shown),
input[type="tel"]:not(:placeholder-shown),
input[type="url"]:not(:placeholder-shown),
input[type="search"]:not(:placeholder-shown),
textarea:not(:placeholder-shown) {
  font-style: normal !important;
  color: #495057 !important;
}

/* Style spécifique pour les champs avec gestion JavaScript du placeholder */
.form-control:focus,
.form-select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
  font-style: normal !important;
  color: #495057 !important;
  border-color: var(--accent-color);
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(154, 131, 71, 0.25);
}

/* Style pour les options par défaut des select */
.form-select option[value=""],
select option[value=""] {
  color: #e0e0e0 !important;
  font-style: italic !important;
}

/* Style pour les champs requis */
.form-control[required],
.form-select[required],
input[required],
textarea[required],
select[required] {
  border-left: 3px solid #dc3545;
}

.form-control[required]:valid,
.form-select[required]:valid,
input[required]:valid,
textarea[required]:valid,
select[required]:valid {
  border-left: 3px solid #28a745;
}

/* Style pour les groupes de formulaires */
.form-group,
.mb-3,
.row .col-md-6,
.row .col-md-4,
.row .col-md-12 {
  margin-bottom: 1rem;
}

/* Style pour les messages d'aide */
.form-text,
.help-block,
small.text-muted {
  font-size: 0.875rem;
  color: #6c757d !important;
  font-style: italic;
  margin-top: 0.25rem;
}

/* Style pour les champs en erreur */
.form-control.is-invalid,
.form-select.is-invalid,
input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 0.4 0.4 m0 0 0.4 0.4 m-0.4-0.4L5.8 5.4 m0.4 0.4L5.8 6.2'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Style pour les champs valides */
.form-control.is-valid,
.form-select.is-valid,
input.is-valid,
textarea.is-valid,
select.is-valid {
  border-color: #28a745;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73 0.13-.13L1.54 5.7C1.48 5.64 1.48 5.54 1.54 5.48L1.67 5.35C1.73 5.29 1.83 5.29 1.89 5.35L2.5 5.96L6.11 2.35C6.17 2.29 6.27 2.29 6.33 2.35L6.46 2.48C6.52 2.54 6.52 2.64 6.46 2.7L2.63 6.53C2.57 6.59 2.47 6.59 2.41 6.53L2.3 6.73Z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Style pour les feedback messages */
.invalid-feedback,
.valid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

.invalid-feedback {
  color: #dc3545;
}

.valid-feedback {
  color: #28a745;
}

/* Style pour les checkboxes et radios */
.form-check-input {
  width: 1em;
  height: 1em;
  margin-top: 0.25em;
  vertical-align: top;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 0.25em;
}

.form-check-label {
  color: #495057 !important;
  font-weight: normal !important;
  margin-left: 0.5rem;
}

/* Style pour les input groups */
.input-group .form-control,
.input-group .form-select {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #495057;
  text-align: center;
  white-space: nowrap;
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
}

/* Formulaire commande — mode de livraison */
.order-delivery-mode {
  border: 0;
  padding: 0;
  margin: 0;
}

.order-delivery-mode__options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.order-delivery-address-fields {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.order-delivery-address-fields[hidden],
#use_same_address_wrap[hidden] {
  display: none !important;
}
