/* ======================================================
   APP.CSS â€” Layout & Components (agnostique au thÃ¨me)
   Tout passe par les variables de theme.css
   ====================================================== */

html, body { height: auto; min-height: 100%; overflow-y: auto; }
#app, .app, .container-fluid, .page-wrapper { height: auto; overflow: visible; }

body { padding-top: 70px; } /* navbar fixed-top â€” hauteur rÃ©elle ~66px */

/* Conteneur principal â€” max-width centrÃ© */
.site-wrap {
  max-width: 1200px;
  margin: 0 auto;
  overflow: visible;
  padding-top: 20px;
}

/* L'hero ignore le padding-top du site-wrap */
.site-wrap #app > .hero-section,
.site-wrap #app > section:first-child.hero-section {
  margin-top: -20px;
}


/* â”€â”€ Admin layout â€” s'Ã©chappe du site-wrap SANS transform â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   IMPORTANT : Ne pas utiliser transform ici â€” cela crÃ©erait un
   containing block et casserait position:fixed de la sidebar.
   On utilise margin-left nÃ©gatif Ã  la place.                     */
.site-wrap #app > .admin-layout,
#app > .admin-layout {
  margin-left: calc(-50vw + 50%);
  width: 100vw;
  margin-top: -20px; /* annule le padding-top du site-wrap */
}

/* â”€â”€ Hero section â€” s'Ã©chappe du site-wrap (sans transform) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.site-wrap .hero-section {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw); /* compatible background-attachment:fixed */
}

/* SupprimÃ© : hero-escape (remplacÃ© par la rÃ¨gle ci-dessus) */
.hero-escape { /* conservÃ© pour compat */ }

/* â”€â”€ Layout gÃ©nÃ©ral â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.main-wrap      { padding: 0 0 60px; }
.stack-3 > * + * { margin-top: 12px; }
.stack-4 > * + * { margin-top: 16px; }
.stack-5 > * + * { margin-top: 20px; }

/* â”€â”€ Typographie â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-title    { font-weight: 900; letter-spacing: .2px; margin: 0; }
.page-subtitle { color: var(--text-soft); margin: 6px 0 0 0; }

/* â”€â”€ Navbar â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.navbar-brand     { font-weight: 900; letter-spacing: .4px; }
.navbar .nav-link { position: relative; }
.navbar .nav-link.active,
.navbar .nav-link[aria-current="page"] { color: #fff !important; }

/* â”€â”€ Cards â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.card { overflow: hidden; }
.card .card-body { padding: 1.4rem; }
.card-header {
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.4rem;
}
.card-footer {
  background: rgba(255,255,255,.02);
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 1.4rem;
}

/* â”€â”€ Tables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.table thead th  { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.table td, .table th { padding: .85rem .95rem; }

/* â”€â”€ Page header helper â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.page-header .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* â”€â”€ KPI cards (admin) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  grid-column: span 12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), var(--surface);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.kpi:hover {
  border-color: rgba(249,115,22,.20);
  box-shadow: var(--shadow), var(--glow-brand);
}
@media (min-width: 768px) { .kpi { grid-column: span 6; } }
@media (min-width: 992px) { .kpi { grid-column: span 3; } }

.kpi::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: .9;
}
.kpi-top   { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: .82rem; color: var(--text-soft); letter-spacing: .06em; text-transform: uppercase; font-family: var(--font-title); }
.kpi-value { font-size: 2.2rem; font-weight: 950; line-height: 1.1; margin-top: 4px; }
.kpi-sub   { font-size: .82rem; color: var(--muted); margin-top: 4px; }

.kpi-icon {
  width: 50px; height: 50px;
  font-size: 1.35rem;
  border-radius: 14px;
  display: grid; place-items: center;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,.04);
  transition: box-shadow .25s;
}
.kpi-icon.icon-orange { color: var(--brand);   box-shadow: var(--glow-brand); }
.kpi-icon.icon-cyan   { color: var(--accent);  box-shadow: var(--glow-accent); }
.kpi-icon.icon-green  { color: #22c55e; box-shadow: 0 0 16px rgba(34,197,94,.22); }
.kpi-icon.icon-yellow { color: #f59e0b; box-shadow: 0 0 16px rgba(245,158,11,.22); }
/* Legacy aliases */
.kpi-icon.icon-purple { color: #a78bfa; box-shadow: 0 0 16px rgba(139,92,246,.22); }
.kpi-icon.icon-pink   { color: #fb7185; box-shadow: 0 0 16px rgba(251,113,133,.22); }

/* -- Reservations : grille produits (cards, max 3 par ligne, centree) -- */
.product-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: 20px;
  max-width: 1040px;
  margin: 0 auto 24px;
}
.product-kpi { display: flex; }
.product-kpi > a { height: 100%; }
.product-kpi .kpi { height: 100%; }
@media (max-width: 575.98px) {
  .product-kpi-grid { grid-template-columns: minmax(0, 320px); }
}

/* â”€â”€ Admin Layout (shell imbriquÃ©) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Les containers Bootstrap dans l'admin remplissent tout l'espace dispo */
.admin-content .container,
.admin-content .container-sm,
.admin-content .container-md,
.admin-content .container-lg,
.admin-content .container-xl,
.admin-content .container-xxl,
.admin-content .container-fluid {
  max-width: 100% !important;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.admin-layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

/* Sidebar */
.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 70px;             /* colle sous la topbar (hauteur rÃ©elle navbar) */
  left: 0;
  height: calc(100vh - 70px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(249,115,22,.2) transparent;
  z-index: 100;
  transition: transform .3s ease;
}

/* Sidebar scrollbar */
.admin-sidebar::-webkit-scrollbar       { width: 3px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(249,115,22,.25); }

/* Brand / header sidebar */
.sidebar-brand {
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: #fff;
  box-shadow: var(--glow-brand);
  flex-shrink: 0;
}
.sidebar-brand-text {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .06em;
  line-height: 1.2;
  color: var(--text);
}
.sidebar-brand-sub {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .05em;
}

/* Nav groups */
.sidebar-group {
  padding: 14px 10px 6px;
}
.sidebar-group-label {
  font-family: var(--font-title);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 8px;
  margin-bottom: 4px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  user-select: none;
}
.sidebar-item i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  opacity: .75;
  transition: opacity .18s, color .18s;
}
.sidebar-item:hover {
  background: rgba(249,115,22,.08);
  color: var(--text);
}
.sidebar-item:hover i { opacity: 1; color: var(--brand); }

.sidebar-item.active {
  background: rgba(249,115,22,.12);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--brand);
  font-weight: 600;
}
.sidebar-item.active i { opacity: 1; color: var(--brand); }

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: .8rem;
  color: var(--muted);
}

/* Admin content zone */
.admin-content {
  flex: 1;
  min-width: 0;
  padding: 28px 28px 60px;
  margin-left: 260px;
  overflow: visible;
}

/* Mobile sidebar toggle */
.sidebar-toggle-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 16px;
  z-index: 200;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: var(--glow-brand), var(--shadow);
  cursor: pointer;
  transition: transform .2s;
}
.sidebar-toggle-btn:hover { transform: scale(1.08); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
  backdrop-filter: blur(4px);
}

/* Responsive admin */
@media (max-width: 991px) {
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.show { display: block; }
  .sidebar-toggle-btn   { display: flex; align-items: center; justify-content: center; }
  .admin-content { padding: 20px 16px 80px; margin-left: 0; }
}

@media (min-width: 992px) {
  .sidebar-toggle-btn { display: none; }
}

/* â”€â”€ Shop / Product â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.product-card { grid-column: span 12; }
@media (min-width: 768px) { .product-card { grid-column: span 6; } }
@media (min-width: 992px) { .product-card { grid-column: span 4; } }

/* â”€â”€ Booking summary â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.booking-summary {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: rgba(255,255,255,.025);
  padding: 16px 18px;
}
.booking-summary .label  { color: var(--text-soft); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.booking-summary .value  { font-size: 1.25rem; font-weight: 900; margin-top: 6px; }
.booking-summary .total  { font-size: 1.75rem; font-weight: 950; }

/* â”€â”€ QR Code â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#loyalty-qrcode img, #loyalty-qrcode canvas {
  display: block;
  width: 180px; height: 180px;
}

/* â”€â”€ Date/time inputs â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: .65;
  cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

/* â”€â”€ Section containers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* â”€â”€ Utility â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.text-gradient {
  background: linear-gradient(90deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.border-gradient {
  border: 1px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(90deg, var(--brand), var(--accent)) border-box;
}

/* â”€â”€ Homepage Blocks â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hpblock-overlay {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}

/* Texte + Image â€” sâ€™Ã©chappe du site-wrap (pleine largeur) */
.hpblock-text-image,
.hpblock-text-only,
.hpblock-image-banner {
  position: relative;
  background-size: cover;
  background-position: center;
}
.site-wrap .hpblock-text-only,
.site-wrap .hpblock-text-image,
.site-wrap .hpblock-image-banner {
  width: 100vw;
  margin-left: calc(50% - 50vw); /* compatible background-attachment:fixed */
}

/* Typographie des blocs */
.hpblock-eyebrow {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.hpblock-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
}
.hpblock-title span { color: var(--brand); }
.hpblock-subtitle {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 16px;
}
.hpblock-content {
  color: var(--text-soft);
  line-height: 1.75;
}

/* Carousel items height */
.hpblock-carousel .carousel-item.hero-section {
  display: none;
  align-items: center;
}
.hpblock-carousel .carousel-item.active.hero-section,
.hpblock-carousel .carousel-item-next.hero-section,
.hpblock-carousel .carousel-item-prev.hero-section {
  display: flex !important;
}

/* â”€â”€ Admin Upload Zone â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px;
  border: 2px dashed var(--border-subtle);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: rgba(255,255,255,.02);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--brand);
  background: rgba(249,115,22,.06);
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 0;
  padding: 36px 0 28px;
  border-top: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, transparent, rgba(249,115,22,.04));
}
.site-footer__brand {
  color: var(--brand);
  font-weight: 600;
}
.site-footer__social {
  color: var(--text-soft);
  font-size: 1.15rem;
  transition: color .2s;
  text-decoration: none;
}
.site-footer__social:hover { color: var(--brand); }
