/*
 * LAYOUT STYLES — Chicken Way
 * Blanc vitrine, liserés rouge/bleu, footer bande bleue (cf. panneaux ext.)
 */

/* === CONTAINER === */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* === HEADER === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 3px solid var(--primary);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

/* liseré bleu sous le liseré rouge — double filet de l'enseigne */
.header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 3px;
  height: 3px;
  background: var(--accent);
}

.header-spacer {
  height: calc(var(--header-height) + 6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-order {
  display: none;
}

@media (min-width: 640px) {
  .header-order { display: inline-flex; }
}

.nav-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--accent);
  border-radius: var(--radius-md);
  background: #f4f6fb;
  border: 1.5px solid #e0e5f2;
  transition: all 0.3s ease;
  position: relative;
}

.nav-btn:hover {
  transform: translateY(-2px);
  background: #eaeef9;
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--accent);
}

.nav-btn:active {
  transform: scale(0.9);
}

.cart-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  box-shadow: var(--shadow-sm);
}

/* === MAIN === */
.main {
  min-height: calc(100vh - var(--header-height) - 200px);
  padding: var(--space-8) 0;
}

/* === FOOTER — bande bleu profond, filet rouge (bas de panneau) === */
.footer {
  padding: 56px 20px 36px;
  border-top: none;
  text-align: center;
  background: var(--purple);
  color: rgba(255, 255, 255, 0.85);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--primary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.footer-link {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.75);
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-hours {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.copyright {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
}

/* === FLASH MESSAGES === */
.flash-messages {
  position: fixed;
  top: calc(var(--header-height) + var(--space-4));
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.flash {
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-lg);
  animation: slideIn var(--transition-normal);
}

.flash-success { background-color: var(--color-success); color: white; }
.flash-error { background-color: var(--color-error); color: white; }
.flash-warning { background-color: var(--color-warning); color: white; }
.flash-info { background-color: var(--color-info); color: white; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.header-logo img {
  height: 58px;
  width: auto;
  object-fit: contain;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header-logo img {
    height: 46px;
  }
}

/* === MENU OVERLAY (mobile nav) === */
html.nav-open {
  overflow: hidden;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(18, 26, 64, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.nav-overlay.is-open {
  display: flex;
}

.nav-overlay[hidden] {
  display: none !important;
}

.nav-drawer {
  width: min(560px, 100%);
  max-height: 88vh;
  background: #ffffff;
  border: 1px solid #e6e9f4;
  border-top: 4px solid var(--primary);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: drawerSlideUp 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes drawerSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #edf0f8;
}

.nav-drawer__title {
  font-family: var(--font-family-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.15rem;
  color: var(--accent);
}

.nav-drawer__close {
  width: 44px;
  height: 44px;
  border: 1.5px solid #e0e5f2;
  background: #f4f6fb;
  border-radius: var(--radius-md);
  color: var(--text-main);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-drawer__close:hover {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(90deg);
}

.nav-drawer__body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: #f7f8fc;
  border: 1.5px solid #e8ecf6;
  color: var(--text-main);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.nav-item:hover {
  background: rgba(var(--accent-rgb), 0.06);
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateX(6px);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.nav-item--highlight {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--glow-box-primary);
}

.nav-item--highlight:hover {
  background: var(--color-primary-hover);
  color: #fff;
  border-color: var(--color-primary-hover);
  transform: translateX(6px);
}

.nav-divider {
  margin: 22px 16px 6px;
  font-size: 11px;
  font-weight: 400;
  font-family: var(--font-family-accent);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--primary);
}

.nav-drawer__footer {
  padding: 18px;
  border-top: 1px solid #edf0f8;
  text-align: center;
  background: #f4f6fb;
}

.nav-drawer__brand {
  margin: 0;
  font-family: var(--font-family-heading);
  text-transform: uppercase;
  color: var(--accent);
  font-size: 0.95rem;
}

.nav-drawer__sub {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ── Bandeau d'état Ouvert/Fermé (spec console.md §3, adapté à la DA claire) ── */
.status-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-muted, #5d6482);
  background: var(--color-bg-alt, #f4f6fb);
  border-bottom: 1px solid var(--border-color, #e4e8f3);
}
.status-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.status-bar--open .status-bar__dot {
  background: #1d9e55;
  box-shadow: 0 0 6px rgba(29, 158, 85, 0.45);
}
.status-bar--closed .status-bar__dot {
  background: var(--primary, #c41c1b);
  box-shadow: 0 0 6px rgba(196, 28, 27, 0.4);
}

/* Crédit agence — lien bleu « web » (spec footer.md) */
.credit-link { color: #4ea6ff; text-decoration: none; }
.credit-link:hover { color: #7bbcff; }
