/* Phase 2 — compléments (s'appuie sur les variables de style.css) */

/* Barre de navigation simple (pages sans hero) */
.topbar { background: var(--black); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 14px rgba(0,0,0,0.4); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0.7rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar-logo { display: flex; align-items: center; gap: 0.6rem; }
.topbar-logo img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.topbar-logo span { font-family: 'Barlow Condensed','Oswald',sans-serif; font-weight: 800; color: var(--white); text-transform: uppercase; letter-spacing: 0.04em; font-size: 1.2rem; }
.topbar-logo span b { color: var(--yellow); }
.topbar-nav { display: flex; align-items: center; gap: 1.25rem; }
.topbar-nav a { color: rgba(255,255,255,0.8); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
.topbar-nav a:hover, .topbar-nav a.active { color: var(--yellow); }
.topbar-cart { position: relative; }
.topbar-cart .badge { background: var(--yellow); color: var(--black); border-radius: 999px; padding: 0.05rem 0.5rem; font-size: 0.72rem; font-weight: 800; margin-left: 0.3rem; }

/* Badges produit */
.badge-indispo { background: var(--text-muted); color: var(--white); font-size: 0.68rem; font-weight: 800; padding: 0.25rem 0.6rem; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.order-item-card.indispo { opacity: 0.6; }
.menu-card.indispo, .order-item-card.indispo { filter: grayscale(0.4); }

/* Cartes catalogue : bandeau indisponible */
.menu-card { position: relative; }
.menu-card .indispo-ribbon { position: absolute; top: 0.75rem; left: 0.75rem; background: var(--text); color: #fff; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; }

/* Modal succès commande (réutilise .modal de style.css) */
.order-number { font-family: 'Barlow Condensed','Oswald',sans-serif; font-size: 2rem; font-weight: 800; color: var(--black); letter-spacing: 0.04em; }

/* Petit espace bas de page tunnel */
.page-pad { padding: 2rem 0 4rem; }
[x-cloak] { display: none !important; }

/* ===== RESPONSIVE MOBILE / TABLETTE ===== */
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; gap: 0.4rem 0.9rem; padding: 0.55rem 0.9rem; }
  .topbar-logo img { width: 34px; height: 34px; }
  .topbar-logo span { font-size: 0.95rem; }
  .topbar-nav { gap: 0.9rem; width: 100%; justify-content: center; flex-wrap: wrap; }
  .topbar-nav a, .topbar-cart { font-size: 0.72rem; letter-spacing: 0.03em; }
  .page-hero { height: 200px; }
  .contact-info-row { grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 420px) {
  .contact-info-row { grid-template-columns: 1fr; }
  .order-layout { padding: 1rem; }
  .cart-sidebar { position: static; }
}
/* Zone tactile confortable (boutons) sur tactile */
@media (hover: none) {
  .btn, .btn-order-sm, .submit-order-btn, .qty-btn, .cat-btn { min-height: 40px; }
}

/* ===== PAGE CONTACT ===== */
.contact-info-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.contact-map-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; }
.contact-map-row .map-container { height: 420px; margin: 0; }
.devanture { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--black); min-height: 420px; }
.devanture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.devanture-legende { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; padding: 1.5rem 1rem 0.8rem; font-size: 0.9rem; font-weight: 700; }
.devanture.devanture-vide { display: flex; align-items: center; justify-content: center; }
.devanture.devanture-vide img { display: none; }
.devanture.devanture-vide::after { content: 'Photo de la devanture à venir'; color: var(--text-muted); font-size: 0.9rem; }
@media (max-width: 800px) { .contact-map-row { grid-template-columns: 1fr; } .contact-map-row .map-container, .devanture { height: 320px; min-height: 320px; } }

/* Hero : scène 3D EN HAUT, slogan EN DESSOUS (pas de superposition) */
.hero { flex-direction: column; justify-content: center; gap: 0.5rem; }
.hero-3d { position: relative; inset: auto; width: 100%; max-width: 860px; height: 42vh; min-height: 280px; margin: 0 auto; z-index: 1; pointer-events: none; }
.hero-3d #hero-canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease; }
.hero-3d #hero-canvas.ready { opacity: 1; }
.hero .hero-content { position: relative; z-index: 2; margin-top: 0; }
.hero .hero-content h1 { font-size: clamp(1.9rem, 5vw, 3.4rem); }
.hero .hero-content p { font-size: 0.98rem; margin-bottom: 1.5rem; }
.hero .hero-badge { margin-bottom: 0.8rem; }
@media (max-width: 768px) { .hero-3d { height: 32vh; min-height: 220px; } }

/* ===== DASHBOARDS CAISSE / CUISINE ===== */
.dash-body { background: var(--gray-light); min-height: 100vh; }
.dash-topbar { background: var(--black); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1.25rem; position: sticky; top: 0; z-index: 100; }
.dash-brand { display: flex; align-items: center; gap: 0.6rem; }
.dash-brand img { width: 38px; height: 38px; border-radius: 50%; }
.dash-brand span { font-family: 'Barlow Condensed','Oswald',sans-serif; font-weight: 800; letter-spacing: 0.08em; color: var(--yellow); font-size: 1.3rem; }
.dash-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.85rem; }
.dash-live { color: var(--red); font-weight: 700; }
.dash-live.on { color: #57d977; }
.dash-logout { background: transparent; color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.25); border-radius: 4px; padding: 0.3rem 0.7rem; font-size: 0.78rem; }
.dash-logout:hover { border-color: var(--yellow); color: var(--yellow); }
.dash-wrap { max-width: 1400px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.dash-empty { text-align: center; color: var(--text-muted); padding: 3rem; font-size: 1.1rem; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.ocard { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border-left: 6px solid var(--gray-2); padding: 1.1rem; }
.ocard.st-en_attente { border-left-color: var(--text-muted); }
.ocard.st-confirmee { border-left-color: var(--yellow); }
.ocard.st-prete { border-left-color: var(--success); }
.ocard.st-en_livraison { border-left-color: #2196F3; }
.ocard-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.ocard-num { font-family: 'Barlow Condensed','Oswald',sans-serif; font-weight: 800; font-size: 1.15rem; }
.ocard-age { font-size: 0.78rem; color: var(--text-muted); }
.ocard-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.tag { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.18rem 0.5rem; border-radius: 4px; background: var(--gray); color: var(--text); }
.tag-confirmee { background: var(--yellow); color: #000; }
.tag-prete { background: var(--success-light); color: var(--success); }
.tag-paye { background: var(--success-light); color: var(--success); }
.tag-impaye { background: var(--red-light); color: var(--red); }
.ocard-client { font-size: 0.88rem; margin-bottom: 0.5rem; }
.ocard-adr { font-size: 0.8rem; color: var(--text-light); margin-top: 0.2rem; }
.ocard-items { font-size: 0.85rem; margin: 0.5rem 0; border-top: 1px solid var(--gray); padding-top: 0.5rem; }
.ocard-items li { display: flex; justify-content: space-between; padding: 0.15rem 0; }
.ocard-note { font-size: 0.8rem; color: var(--red); background: var(--red-light); padding: 0.35rem 0.5rem; border-radius: 4px; margin: 0.4rem 0; }
.ocard-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 1rem; border-top: 2px solid var(--yellow); padding-top: 0.5rem; margin: 0.5rem 0 0.75rem; }
.ocard-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ab { border: none; border-radius: 5px; padding: 0.5rem 0.8rem; font-size: 0.8rem; font-weight: 800; cursor: pointer; text-transform: uppercase; letter-spacing: 0.03em; }
.ab-go { background: var(--black); color: var(--yellow); }
.ab-go:hover { background: var(--yellow); color: #000; }
.ab-cash { background: var(--success); color: #fff; }
.ab-print { background: var(--gray); color: var(--text); }
.ab-cancel { background: var(--red-light); color: var(--red); }
.ab-cancel:hover { background: var(--red); color: #fff; }

/* Kitchen Display */
.kitchen { background: #14161a; }
.kitchen .dash-empty { color: #7a8290; }
.kds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.kcard { background: #1f232b; color: #fff; border-radius: var(--radius); padding: 1.1rem; border-top: 6px solid #3a4150; }
.kcard.warn { border-top-color: var(--yellow); }
.kcard.urgent { border-top-color: var(--red); animation: kpulse 1.4s ease-in-out infinite; }
@keyframes kpulse { 50% { box-shadow: 0 0 0 3px rgba(229,57,53,0.4); } }
.kcard-head { display: flex; justify-content: space-between; align-items: baseline; }
.kcard-num { font-family: 'Barlow Condensed','Oswald',sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--yellow); }
.kcard-age { font-size: 0.85rem; color: #aab2c0; }
.kcard-type { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; background: #2c313b; padding: 0.2rem 0.55rem; border-radius: 4px; margin: 0.5rem 0; }
.kcard-items { list-style: none; margin: 0.5rem 0; }
.kcard-items li { font-size: 1.05rem; padding: 0.3rem 0; border-bottom: 1px solid #2c313b; }
.kcard-items .q { color: var(--yellow); font-weight: 800; }
.kcard-note { font-size: 0.9rem; color: #ffd54f; background: rgba(255,213,79,0.12); padding: 0.4rem 0.6rem; border-radius: 4px; margin: 0.5rem 0; }
.kbtn { width: 100%; margin-top: 0.75rem; background: var(--success); color: #fff; border: none; border-radius: 6px; padding: 0.85rem; font-size: 1.05rem; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.kbtn:hover { background: #256428; }

/* ===== SUIVI CLIENT ===== */
.suivi-wrap { max-width: 720px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.suivi-empty { text-align: center; color: var(--text-muted); padding: 3rem 1rem; }
.suivi-empty a { color: var(--yellow-dark); font-weight: 800; }
.suivi-title { font-size: 2rem; text-transform: uppercase; text-align: center; }
.suivi-num { text-align: center; font-family: 'Barlow Condensed','Oswald',sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--yellow-dark); margin-bottom: 1.5rem; }
.suivi-cancel { background: var(--red-light); color: var(--red); text-align: center; padding: 1rem; border-radius: var(--radius); font-weight: 700; }
.suivi-eta { text-align: center; font-size: 1.05rem; margin-top: 1.5rem; }
.suivi-done { text-align: center; font-size: 1.15rem; font-weight: 800; color: var(--success); margin-top: 1.5rem; }
.suivi-map { height: 340px; border-radius: var(--radius); margin-top: 1.5rem; box-shadow: var(--shadow); }

.timeline { list-style: none; display: flex; flex-direction: column; gap: 0; max-width: 420px; margin: 0 auto; }
.tl-step { display: flex; align-items: center; gap: 1rem; position: relative; padding: 0.55rem 0; }
.tl-step::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--gray); }
.tl-step:first-child::before { top: 50%; }
.tl-step:last-child::before { bottom: 50%; }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--white); border: 3px solid var(--gray-2); z-index: 1; flex-shrink: 0; }
.tl-label { font-weight: 700; color: var(--text-muted); }
.tl-step.done .tl-dot { background: var(--success); border-color: var(--success); }
.tl-step.done .tl-label { color: var(--text); }
.tl-step.active .tl-dot { background: var(--yellow); border-color: var(--yellow-dark); box-shadow: 0 0 0 4px rgba(251,202,0,0.3); }
.tl-step.active .tl-label { color: var(--black); font-weight: 800; }

/* ===== HISTORIQUE ESPACE CLIENT ===== */
.hist-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.hist-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; }
.hist-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.hist-num { font-family: 'Barlow Condensed','Oswald',sans-serif; font-weight: 800; font-size: 1.1rem; }
.hist-date { font-size: 0.78rem; color: var(--text-muted); }
.hist-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.tag-livree { background: var(--success-light); color: var(--success); }
.tag-annulee { background: var(--red-light); color: var(--red); }
.tag-en_preparation, .tag-en_livraison { background: var(--yellow-pale); color: var(--yellow-dark); }
.hist-items { font-size: 0.85rem; color: var(--text-light); margin: 0.4rem 0; }
.hist-items li { padding: 0.1rem 0; }
.hist-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--gray); padding-top: 0.6rem; margin-top: 0.5rem; }
.hist-total { font-weight: 800; }
.hist-actions { display: flex; gap: 0.4rem; }
.hist-actions form { margin: 0; }
.hist-actions .ab { text-decoration: none; display: inline-block; }
