/* Thème Damnatio Post-Apocalypse - base inspirée de Deluxe */
:root {
  --color-bg: #181a1b;
  --color-accent: #4caf50;
  --color-danger: #c0392b;
  --color-warning: #f1c40f;
  --color-text: #e0e0e0;
  --color-shadow: #222a;
  --font-title: 'VT323', monospace;
  --font-body: 'Nunito', sans-serif;
}
body {
  background: linear-gradient(135deg, #232526 0%, #414345 100%);
  color: var(--color-text);
  font-family: var(--font-body);
  min-height: 100vh;
  margin: 0;
  transition: background 1s;
}

h1, h2, h3 {
  font-family: var(--font-title);
  color: var(--color-accent);
  text-shadow: 2px 2px 8px var(--color-shadow);
  letter-spacing: 2px;
  animation: fadeInDown 1s;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: rgba(24,26,27,0.95);
  border-radius: 12px;
  box-shadow: 0 4px 24px var(--color-shadow);
  padding: 1rem 2rem 2rem 2rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.3s;
}
.card:hover {
  box-shadow: 0 8px 32px var(--color-accent);
}

.btn-apoc {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  font-family: var(--font-title);
  cursor: pointer;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: background 0.3s, box-shadow 0.3s;
}
.btn-apoc:hover {
  /* Hover to a slightly darker green (keep within accent family) */
  background: #378f36; /* darker than --color-accent (#4caf50) */
  box-shadow: 0 4px 16px rgba(55,143,54,0.22);
}

/* Link colors - avoid default browser blue, use post-apocalypse accent */
a, a:link, a:active {
  color: var(--color-accent);
  text-decoration: underline dotted rgba(76,175,80,0.15);
}
a:hover {
  color: #7be57b; /* lighter green on hover */
  text-decoration: underline;
}
a:visited {
  color: #3e8a3e;
}

/* Ensure sidebar/footer links use the same palette */
.sidebar-link, .footer-main a, .sidebar-btn {
  color: var(--color-text);
}
.sidebar-link a, .sidebar-link:link, .sidebar-link:visited {
  color: var(--color-text);
}
.sidebar-link.active, .sidebar-link:hover {
  color: var(--color-accent) !important;
}

/* Site main wrapper - centralized container replacing inline styles */
.site-main {
  /* Allow more horizontal space for page content while keeping a comfortable max width */
  max-width: 95%;
  margin: 2rem auto;
  flex: 1 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

/* Slightly larger mobile breakpoint padding and width adjustments */
@media (max-width: 768px) {
  .site-main { margin: 1rem auto; max-width: 96%; padding: 0 1rem; }
}

/* Shop-specific responsive helpers */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.shop-card {
  background: linear-gradient(180deg, rgba(17,17,17,0.7), rgba(34,34,34,0.6));
  padding: 0.9rem;
  border-radius: 10px;
  display:flex;
  flex-direction:column;
  min-height: 140px;
}

.shop-card h5 { margin: 0 0 0.5rem 0; color: var(--color-accent); }
.shop-card p { margin: 0 0 0.6rem 0; color: #dcdcdc; opacity:0.95 }

@media (max-width: 600px) {
  .shop-grid { grid-template-columns: 1fr; }
  .site-main { padding: 0 0.5rem; }
  .shop-card { padding: 0.75rem; }
}


/* Utility: allow full-width content on specific pages (e.g., homepage) */
.home-full { max-width: 100%; padding-left: 1rem; padding-right: 1rem; }

/* Form controls styling to match Damnatio theme */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
textarea,
select,
.form-control {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--color-text);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

input::placeholder, textarea::placeholder {
  color: rgba(224,224,224,0.55);
}

input:focus, textarea:focus, select:focus, .form-control:focus {
  outline: none;
  border-color: rgba(76,175,80,0.85);
  box-shadow: 0 6px 20px rgba(76,175,80,0.06);
}

/* Custom-styled checkboxes and radios to avoid white backgrounds */
/* Keep accent-color as fallback for supporting browsers */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.5rem;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

/* Fallback for browsers that support accent-color */
input[type="checkbox"], input[type="radio"] { accent-color: var(--color-accent); }

/* Checkbox: show checkmark via pseudo-element */
input[type="checkbox"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.5em;
  height: 0.28em;
  border: solid #fff;
  border-width: 0 0.12em 0.12em 0;
  transform: translate(-50%,-60%) rotate(45deg) scale(0);
  opacity: 0;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

input[type="checkbox"]:checked {
  background: var(--color-accent);
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 6px 18px rgba(55,143,54,0.12) inset;
}
input[type="checkbox"]:checked::after {
  transform: translate(-50%,-60%) rotate(45deg) scale(1);
  opacity: 1;
}

/* Radio: circular look and dot */
input[type="radio"] {
  border-radius: 999px;
}
input[type="radio"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.5em;
  height: 0.5em;
  border-radius: 999px;
  background: transparent;
  transform: translate(-50%,-50%) scale(0);
  transition: transform 0.12s ease, background 0.12s ease;
}
input[type="radio"]:checked {
  background: var(--color-accent);
  border-color: rgba(0,0,0,0.12);
}
input[type="radio"]:checked::after {
  background: #fff;
  transform: translate(-50%,-50%) scale(0.55);
}

/* Focus states */
input[type="checkbox"]:focus, input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(76,175,80,0.08);
  border-color: rgba(76,175,80,0.6);
}

/* Provide a subtle custom look for switch-like / inline controls */
.form-check-label { color: var(--color-text); }

/* Buttons
   Use btn-apoc for primary actions and provide smaller variants */
.btn-apoc.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.95rem;
}

.btn-outline-danger {
  /* Treat dangerous outline-like buttons as neutral by default but keep rounded */
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--color-text);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}
.btn-outline-danger:hover {
  /* Use darker accent green on hover instead of red */
  background: rgba(55,143,54,0.08);
  color: var(--color-accent);
  border-color: rgba(55,143,54,0.2);
}

/* Make generic Bootstrap buttons rounded to match theme */
.btn { border-radius: 8px; }
.btn-sm { border-radius: 6px; }

/* Quantity controls used in shop/cart */
.quantity-input { width: 72px; text-align: center; background: rgba(255,255,255,0.02); }
.quantity-btn {
  background: rgba(255,255,255,0.03);
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
}
.quantity-btn:hover { background: rgba(255,255,255,0.04); box-shadow: 0 6px 18px rgba(0,0,0,0.45); }

/* Input group buttons (coupon/giftcards) */
.input-group .btn-apoc, .input-group .btn {
  border-top-left-radius: 0; border-bottom-left-radius: 0;
  /* make input-group buttons match the accent by default */
  background: var(--color-accent);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px var(--color-shadow);
}

.input-group .btn:hover {
  background: #378f36;
}

/* Styles specific to inline package card (inserted by shop category JS) */
.shop-package-card {
  position: relative;
  padding: 1.25rem;
  border-radius: 12px;
  overflow: visible;
}

/* Make buy buttons inside the package card match .btn-apoc */
.shop-package-card .btn-primary,
.shop-package-card form .btn-primary,
.shop-package-card a.btn-primary {
  background: var(--color-accent) !important;
  color: #fff !important;
  border: none !important;
  padding: 0.6rem 1rem !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px var(--color-shadow) !important;
}
.shop-package-card .btn-primary:hover {
  background: #378f36 !important;
}

/* Close button style (top-right) */
.shop-package-card .btn-close-apoc {
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  padding: 0.35rem 0.55rem;
  background: rgba(255,255,255,0.02);
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.shop-package-card .btn-close-apoc:hover {
  background: rgba(55,143,54,0.12);
  color: #fff;
  border-color: rgba(55,143,54,0.25);
}

/* Ensure small icon buttons in card (e.g., cart icons) are visible */
.shop-package-card .bi { vertical-align: -0.08em; }

/* Cart specific styles */
.cart-card {
  max-width: 520px;
  margin: 0 auto;
  background: rgba(18,18,18,0.9);
}

.cart-card .card-body { padding: 1.25rem; }

.cart-items {
  width: 100%;
  border-collapse: separate;
}
.cart-items thead th {
  color: var(--color-accent);
  text-transform: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cart-items thead th:nth-child(1) { width: 45%; }
.cart-items thead th:nth-child(2), .cart-items thead th:nth-child(3) { width: 12%; text-align:center; }
.cart-items thead th:nth-child(4) { width: 14%; text-align:center; }
.cart-items thead th:nth-child(5) { width: 10%; text-align:center; }
.cart-items tbody tr { border-bottom: 1px solid rgba(255,255,255,0.03); }
.cart-items td, .cart-items th { vertical-align: middle; padding: 0.65rem 0.5rem; }

/* Specific cell helpers */
.cart-items .price-cell, .cart-items .total-cell, .cart-items .quantity-cell, .cart-items .action-cell { text-align:center; }
.cart-items .name-cell { text-align:left; }
.cart-items .name-cell img { height:48px; width:auto; border-radius:6px; }

.cart-items .action-cell .btn { padding: 0.35rem 0.45rem; border-radius:6px; }
.cart-items .action-cell .btn-danger { background: #e74c3c; border-color: #e74c3c; color:#fff; }
.cart-items .action-cell .btn-danger:hover { background: #c43a2e; border-color:#c43a2e; }

/* Quantity controls alignment */
.quantity-input { width: 64px; text-align: center; border-radius: 6px; }
.quantity-btn { border-radius: 6px; padding: 0.3rem 0.55rem; }

/* Cart actions area */
.cart-actions .btn-apoc { padding: 0.55rem 0.95rem; border-radius: 8px; }
.cart-footer { display:flex; gap:0.6rem; align-items:center; }
.cart-footer .ms-auto { margin-left: auto !important; }

/* Input group buttons (coupon/giftcards) small variant */
.input-group .btn-apoc, .input-group .btn { padding: 0.45rem 0.8rem; border-radius: 6px; }

/* Tables for coupons/giftcards */
.coupons thead th, .coupons tbody td { padding: 0.5rem; }

/* Small adjustments for checkout email input */
.checkout-email { max-width: 200px; margin-left: 0.6rem; }

/* Small helpers for cards containing lists */
.bg-light-sm { background: rgba(255,255,255,0.02); border-radius:8px; }

/* Ensure table dark header fits theme */
.table-dark thead th { background: rgba(0,0,0,0.3); }

/* Classic Table Styles - Light Gray Theme */
table, .table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(240, 240, 240, 0.05);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

table thead, .table thead {
  background: linear-gradient(180deg, rgba(200, 200, 200, 0.15), rgba(180, 180, 180, 0.12));
  border-bottom: 2px solid rgba(160, 160, 160, 0.3);
}

table thead th, .table thead th {
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: #d5d5d5;
  text-align: left;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(180, 180, 180, 0.25);
}

table tbody tr, .table tbody tr {
  border-bottom: 1px solid rgba(200, 200, 200, 0.08);
  transition: background 0.2s ease;
}

table tbody tr:hover, .table tbody tr:hover {
  background: rgba(220, 220, 220, 0.08);
}

table tbody tr:nth-child(even), .table tbody tr:nth-child(even) {
  background: rgba(210, 210, 210, 0.03);
}

table tbody tr:nth-child(even):hover, .table tbody tr:nth-child(even):hover {
  background: rgba(220, 220, 220, 0.08);
}

table tbody td, .table tbody td {
  padding: 0.75rem 1rem;
  color: var(--color-text);
  vertical-align: middle;
}

table tfoot, .table tfoot {
  background: rgba(190, 190, 190, 0.08);
  border-top: 2px solid rgba(160, 160, 160, 0.25);
}

table tfoot td, table tfoot th, .table tfoot td, .table tfoot th {
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: #d5d5d5;
}

/* Bordered table variant */
.table-bordered {
  border: 1px solid rgba(200, 200, 200, 0.15);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid rgba(200, 200, 200, 0.1);
}

/* Striped table variant */
.table-striped tbody tr:nth-child(odd) {
  background: rgba(210, 210, 210, 0.04);
}

/* Hover effect enhancement */
.table-hover tbody tr:hover {
  background: rgba(220, 220, 220, 0.1);
  box-shadow: inset 0 0 0 1px rgba(200, 200, 200, 0.1);
}

/* Compact table variant */
.table-sm td, .table-sm th {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Table header with accent color option */
.table-accent thead {
  background: linear-gradient(180deg, rgba(76, 175, 80, 0.2), rgba(76, 175, 80, 0.15));
  border-bottom: 2px solid rgba(76, 175, 80, 0.4);
}

.table-accent thead th {
  color: var(--color-accent);
  border-bottom-color: rgba(76, 175, 80, 0.3);
}

/* Light gray modern table variant */
.table-light-modern {
  background: linear-gradient(180deg, rgba(240, 240, 240, 0.08), rgba(220, 220, 220, 0.05));
  border: 1px solid rgba(200, 200, 200, 0.12);
}

.table-light-modern thead {
  background: rgba(210, 210, 210, 0.12);
}

.table-light-modern tbody tr:hover {
  background: rgba(230, 230, 230, 0.1);
  transform: scale(1.002);
  transition: all 0.2s ease;
}
