/* === Pages commandes : commander, recapitulatif, confirmation, annulation === */

/* Héros compact */
.commander-hero {
  background: var(--sombre);
  border-bottom: 3px solid var(--or);
  padding: 2rem 1rem;
}
.commander-hero h1 { color: var(--or-clair); margin: 0 0 .4rem; }
.commander-hero p  { color: rgba(255,255,255,.85); margin: 0; font-size: .95rem; }

/* Utilitaires couleurs */
.text-gold       { color: var(--or) !important; }
.text-gold-light { color: var(--or-clair) !important; }
.text-cream      { color: var(--creme) !important; }
.bg-sombre       { background: var(--sombre) !important; }

/* ===== ONGLETS CATÉGORIES ===== */
.sh-tabs {
  flex-wrap: wrap;
  justify-content: center;
  border-bottom: 2px solid rgba(228,207,133,.4);
  gap: 0;
  padding: .4rem .4rem 0;
  background: #a87420;
  border-radius: 6px 6px 0 0;
}
.sh-tabs .nav-link {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: .55rem 1rem;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  white-space: nowrap;
  background: transparent;
  text-align: center;
  letter-spacing: .02em;
  transition: color .15s, border-color .15s, background .15s;
}
.sh-tabs .nav-link:hover   { color: #fff; background: rgba(255,255,255,.12); }
.sh-tabs .nav-link.active  { color: #fff; border-bottom-color: var(--or); background: rgba(0,0,0,.25); font-weight: 700; }

/* ===== LIGNE PLAT ===== */
.plat-row {
  background: #fff;
  border: 1px solid rgba(38,0,83,.1);
  border-radius: 8px;
  padding: .28rem .75rem !important; /* écrase le p-3 Bootstrap */
  cursor: pointer;
  transition: box-shadow .18s;
}
.plat-row:hover { box-shadow: 0 2px 10px rgba(38,0,83,.14); }
.plat-nom  { font-weight: 600; font-size: .92rem; color: var(--sombre); }
.plat-desc {
  font-size: .8rem;
  color: #6B4F3A;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.plat-prix { color: var(--or); font-size: .95rem; font-weight: 700; }

/* Note catégorie */
.cat-note {
  background: rgba(228,207,133,.1);
  border: 1px solid rgba(228,207,133,.3);
  border-radius: 6px;
  color: var(--sombre);
  font-size: .82rem;
  padding: .5rem .9rem;
}

/* ===== BOUTON AJOUTER (+) ===== */
.btn-ajouter {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #C2674A;
  color: #fff;
  border: 2px solid #C2674A;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s, color .18s;
  /* iOS anti-zoom : taille min 44px tactilement */
  min-width: 44px;
  min-height: 44px;
}
.btn-ajouter:hover  { background: #A85539; border-color: #A85539; color: #fff; }
.btn-ajouter:active { transform: scale(.92); }

/* ===== PANIER SIDEBAR (desktop) ===== */
.panier-sidebar {
  background: #FDF6EC;
  color: var(--sombre);
  border-radius: 10px;
  overflow: hidden;
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 90px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(228,207,133,.25);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
}
.panier-sidebar .panier-header {
  background: #7b5611;
  border-bottom: 1px solid rgba(228,207,133,.3);
  padding: .85rem 1rem;
}
.panier-sidebar .panier-header h5 {
  color: #fff;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}
.panier-sidebar .panier-body {
  flex: 1;
  overflow-y: auto;
  padding: .75rem 1rem;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: rgba(228,207,133,.3) transparent;
}
.panier-sidebar .panier-footer {
  background: #fff;
  border-top: 2px solid rgba(228,207,133,.3);
  padding: .85rem 1rem;
}
.panier-sidebar .panier-item { border-bottom-color: rgba(38,0,83,.12); }
.panier-sidebar .panier-item-nom  { color: #2C1A0E; font-weight: 600; }
.panier-sidebar .panier-item-prix { color: #B85C38; font-weight: 700; }
.panier-sidebar .panier-total-label { color: #2C1A0E; opacity: 1; font-weight: 600; }
.panier-sidebar .panier-total-val   { color: #B85C38; font-size: 1.1rem; }
.panier-sidebar .btn-qte {
  background: rgba(38,0,83,.08);
  color: var(--sombre);
  border-color: rgba(38,0,83,.2);
}
.panier-sidebar .btn-qte:hover { background: var(--or); color: #fff; }

/* ===== ITEMS DU PANIER ===== */
.panier-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 0;
  border-bottom: 1px solid rgba(228,207,133,.18);
}
.panier-item-info { flex: 1; min-width: 0; }
.panier-item-nom  { font-size: .85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panier-item-prix { font-size: .8rem; color: var(--or); }
.panier-item-qte  { display: flex; align-items: center; gap: .3rem; flex-shrink: 0; }

/* Boutons quantité */
.btn-qte {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(228,207,133,.18);
  color: var(--or);
  border: 1px solid rgba(228,207,133,.5);
  font-size: .9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background .15s;
}
.btn-qte:hover  { background: var(--or); color: var(--sombre); }
.qte-val { min-width: 18px; text-align: center; font-size: .85rem; }

/* Total panier */
.panier-total-label { font-size: .9rem; opacity: .8; }
.panier-total-val   { font-size: 1.1rem; font-weight: 700; color: var(--or-clair); }

/* ===== BOUTON TERRACOTTA ===== */
.btn-bordeaux {
  background: #C2674A;
  color: #fff;
  border: none;
  font-weight: 600;
  transition: background .18s, box-shadow .18s;
}
.btn-bordeaux:hover:not(:disabled) { background: #A85539; color: #fff; box-shadow: 0 4px 8px rgba(194,103,74,.3); }
.btn-bordeaux:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ===== BOUTON FLOTTANT MOBILE ===== */
.btn-panier-float {
  position: fixed;
  bottom: 22px;
  right: 18px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #B85C38;
  color: #fff;
  border: none;
  font-size: 1.35rem;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  z-index: 1040;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-panier-float .panier-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--or);
  color: var(--sombre);
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  font-size: .72rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ===== OFFCANVAS PANIER MOBILE ===== */
#panierOffcanvas {
  background: #fff;
  color: var(--sombre);
  width: 100%;
}
#panierOffcanvas .offcanvas-header {
  background: var(--sombre);
  border-bottom: 1px solid rgba(228,207,133,.3);
}
#panierOffcanvas .offcanvas-title { color: var(--or-clair); }
#panierOffcanvas .btn-close-white {
  filter: invert(1) sepia(1) saturate(2) hue-rotate(10deg);
}
#panierOffcanvas .panier-footer {
  background: #fff;
  border-top: 2px solid rgba(228,207,133,.3);
  padding-top: 1rem;
}
#panierOffcanvas .panier-item {
  border-bottom-color: rgba(38,0,83,.12);
}
#panierOffcanvas .panier-item-nom  { color: #2C1A0E; font-weight: 600; }
#panierOffcanvas .panier-item-prix { color: #B85C38; font-weight: 700; }
#panierOffcanvas .panier-total-label { color: #2C1A0E; opacity: 1; font-weight: 600; }
#panierOffcanvas .panier-total { color: #B85C38; font-size: 1.1rem; }
#panierOffcanvas .btn-qte {
  background: rgba(38,0,83,.08);
  color: var(--sombre);
  border-color: rgba(38,0,83,.2);
}
#panierOffcanvas .btn-qte:hover { background: var(--or); color: #fff; }

/* ===== TITRES DE SECTIONS (Plats du Jour / Notre carte) ===== */
.pdj-section-titre {
  font-family: 'Great Vibes', cursive;
  font-size: 2.6rem;
  font-weight: normal;
  color: var(--sombre);
  margin: 0 0 .6rem 0;
  line-height: 1.2;
  letter-spacing: .01em;
  text-align: center;
}
.pdj-section-titre + p { text-align: center; }

/* ===== GRILLE PLATS DU JOUR ===== */
.pdj-jours-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
  align-items: stretch;
}
@media (min-width: 768px) {
  .pdj-jours-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
  }
}
.pdj-jour-card {
  border: 1px solid rgba(38,0,83,.18);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  box-shadow: 0 1px 6px rgba(38,0,83,.07);
  transition: box-shadow .18s;
}
.pdj-jour-card:hover { box-shadow: 0 3px 12px rgba(38,0,83,.15); }
.pdj-jour-ferme { opacity: .5; }
.pdj-jour-card-img {
  padding: 0;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
  margin-top: auto;
}
.pdj-jour-card-img img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  box-shadow: 0 10px 32px rgba(38,0,83,.32), 0 3px 10px rgba(0,0,0,.18);
  transition: transform .35s, box-shadow .35s;
}
.pdj-jour-card-img:hover img {
  transform: scale(1.04);
  box-shadow: 0 16px 42px rgba(38,0,83,.42), 0 4px 14px rgba(0,0,0,.22);
}

.pdj-jour-header {
  background: #a87420;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  padding: .5rem .4rem;
  text-align: center;
  letter-spacing: .02em;
}

.pdj-jour-body { padding: .55rem .4rem; flex: 1; }
.pdj-jour-body-vide { display: flex; align-items: center; justify-content: center; min-height: 60px; }

.pdj-ligne {
  display: flex;
  flex-direction: column;
  margin-bottom: .5rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(168,116,32,.15);
}
.pdj-ligne:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.pdj-label {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #a87420;
  margin-bottom: .1rem;
}
.pdj-val {
  color: #1a0a00;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.35;
}
.pdj-commentaire {
  font-size: .72rem;
  color: #888;
  font-style: italic;
  margin-top: .2rem;
  border-top: 1px dashed #ddd;
  padding-top: .2rem;
}

.pdj-jour-footer {
  padding: .5rem .4rem;
  background: #faf5ee;
  border-top: 1px solid rgba(228,207,133,.3);
}
.pdj-prix {
  display: block;
  font-size: .72rem;
  color: var(--or);
  font-weight: 600;
  line-height: 1.4;
}

/* Modal PDJ */
.pdj-modal-ligne {
  display: grid;
  grid-template-columns: 5rem 1fr;
  align-items: baseline;
  gap: .3rem .6rem;
  font-size: .9rem;
  padding: .3rem 0;
  border-bottom: 1px solid rgba(228,207,133,.2);
  color: var(--sombre);
}
.pdj-modal-ligne:last-of-type { border: none; }
.pdj-modal-ligne .pdj-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #7a5a3a;
  padding-top: .1rem;
}
.pdj-modal-commentaire {
  font-size: .8rem;
  color: #888;
  font-style: italic;
  margin-top: .3rem;
  padding-top: .3rem;
  border-top: 1px dashed #ddd;
}

/* Boutons +/- dans la modal PDJ (fond crème → contraste renforcé) */
.modal-body .btn-qte {
  background: var(--sombre);
  color: var(--or);
  border-color: var(--or);
}
.modal-body .btn-qte:hover { background: var(--or); color: var(--sombre); }

/* Mini panier PDJ dans la modal */
.pdj-mini-panier-wrap {
  background: #f5f0e8;
  border: 1px solid rgba(228,207,133,.5);
  border-radius: 8px;
  padding: .55rem .7rem;
  margin-bottom: .8rem;
}
.pdj-mini-panier-titre {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b4a20;
  margin-bottom: .4rem;
}
.pdj-mini-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem 0;
  border-bottom: 1px solid rgba(0,0,0,.07);
  font-size: .8rem;
}
.pdj-mini-item:last-child { border-bottom: none; }
.pdj-mini-item-info { flex: 1; min-width: 0; }
.pdj-mini-item-nom  { font-weight: 600; color: var(--sombre); display: block; }
.pdj-mini-item-formule { color: #777; font-size: .72rem; display: block; }
.pdj-mini-item-qte  { display: flex; align-items: center; gap: .2rem; }
.pdj-mini-item-qte .btn-qte {
  width: 1.4rem; height: 1.4rem; font-size: .8rem; padding: 0;
}
.pdj-mini-item-qte span { min-width: 18px; text-align: center; font-size: .8rem; font-weight: 600; }
.pdj-mini-item-prix {
  font-weight: 600; color: #B85C38; white-space: nowrap;
  font-size: .8rem; min-width: 3.5rem; text-align: right;
}


/* ===== PAGE RÉCAPITULATIF ===== */
.recap-block {
  background: #fff;
  border: 1px solid rgba(38,0,83,.1);
  border-radius: 10px;
  overflow: hidden;
}
.recap-block-header {
  background: #a47317;
  color: #fff;
  padding: .75rem 1.1rem;
  font-weight: 700;
  font-size: .95rem;
}
.recap-block-body { padding: 1.1rem; }

/* Ligne article récap */
.recap-ligne {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .35rem 0;
  border-bottom: 1px solid rgba(38,0,83,.07);
  font-size: .9rem;
}
.recap-ligne:last-child { border: none; }
.recap-ligne .nom-plat { flex: 1; padding-right: .5rem; }
.recap-ligne .prix-plat { font-weight: 600; color: var(--or); white-space: nowrap; }

/* Totaux récap */
.recap-totaux { margin-top: .75rem; }
.recap-totaux .recap-ligne { font-size: .92rem; }
.recap-totaux .ligne-total { font-size: 1.05rem; font-weight: 700; color: #B85C38; }

/* Formulaire coord */
.form-label { font-size: .88rem; font-weight: 600; color: var(--sombre); }
.invalid-feedback { color: #a10000; font-weight: 600; font-size: .85rem; }
/* Anti-zoom iOS : inputs min 16px */
.form-control, .form-select {
  font-size: 1rem;
  border-color: rgba(38,0,83,.2);
}
.form-control:focus, .form-select:focus {
  border-color: var(--or);
  box-shadow: 0 0 0 .2rem rgba(228,207,133,.2);
}

/* ===== PAGES CONFIRMATION / ANNULATION ===== */
.result-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}
.result-icon { font-size: 4rem; line-height: 1.2; }
.result-titre { font-size: 1.8rem; font-weight: 700; margin: .8rem 0 .4rem; }
.result-texte { color: #6B4F3A; font-size: 1rem; max-width: 480px; margin: 0 auto .5rem; }

/* ===== ADMIN COMMANDES ===== */
.admin-navbar-cmd {
  background: var(--sombre);
  border-bottom: 3px solid var(--or);
}
.admin-navbar-cmd .navbar-brand { color: var(--or-clair) !important; }
.admin-navbar-cmd .nav-link     { color: rgba(255,255,255,.85) !important; font-size: .92rem; }
.admin-navbar-cmd .nav-link.active { color: var(--or) !important; font-weight: 700; }
.admin-navbar-cmd .nav-link:hover  { color: var(--or-clair) !important; }

/* Badges statut */
.statut-en_attente  { background: #856404; color: #fff; }
.statut-confirmee   { background: #0d6efd; color: #fff; }
.statut-preparation { background: #fd7e14; color: #fff; }
.statut-prete       { background: #198754; color: #fff; }
.statut-livree      { background: #20c997; color: #fff; }
.statut-annulee     { background: #dc3545; color: #fff; }

.badge-statut {
  padding: .3em .65em;
  font-size: .78rem;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

/* Tableau commandes */
.table-commandes { font-size: .88rem; }
.table-commandes th { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; background: var(--sombre); color: var(--or-clair); }

/* ===== BOUTON DEVIS (bandeau bas de page) ===== */
.page-commander .btn-or { color: #FDF6EC; }
.page-commander .btn-or:hover { color: var(--sombre); }
