:root {
  --green: #1d995b;
  --green-hover: #006648;
  --bg-dark: #0a1628;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #f3f4f6;
  line-height: 1.6;
}
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-hover); text-decoration: underline; }

/* ===== Layout ===== */
.g-header {
  background: var(--bg-dark);
  color: #fff;
  padding: 1rem 0;
}
.g-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.g-header h1 { font-size: 1.25rem; font-weight: 700; }
.g-header h1 a { color: #fff; }
.g-header h1 a:hover { text-decoration: none; color: var(--green); }
.g-header nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.g-header nav a, .g-header nav span { color: #9ca3af; font-size: 0.875rem; }
.g-header nav a:hover { color: #fff; }

.g-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ===== Admin ===== */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.admin-header h1 { font-size: 1.5rem; font-weight: 800; }

/* ===== Forms ===== */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.9375rem;
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29,153,91,.15);
}
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: #f9fafb; text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-hover); border-color: var(--green-hover); }
.btn-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== Alerts ===== */
.alert { padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.875rem; margin-bottom: 1rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* ===== Install / Login ===== */
.install-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a1628, #162a4a);
  padding: 1.5rem;
}
.install-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.install-logo { text-align: center; margin-bottom: 1rem; }
.install-card h1 { text-align: center; font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; }
.install-card p { font-size: 0.9375rem; color: var(--text-light); margin-bottom: 1.5rem; text-align: center; }
.install-card .btn { width: 100%; justify-content: center; }
.install-card .text-center { text-align: center; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-gray-500 { color: #6b7280; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.inline-flex { display: inline-flex; align-items: center; gap: 0.25rem; }

.breadcrumb { font-size: 0.8125rem; color: var(--text-light); margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span { color: var(--text); }

.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--text-light); }
.empty-state p { margin-bottom: 1rem; }

/* ===== Stat cards ===== */
.stat-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.stat-card .value { font-size: 2rem; font-weight: 800; }
.stat-card .label { font-size: 0.875rem; color: var(--text-light); }

/* ===== Data list rows (skates, members, rentals) ===== */
.data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.data-row .info { min-width: 0; flex: 1; }
.data-row .actions { display: flex; gap: 0.5rem; flex-shrink: 0; flex-wrap: wrap; }

/* ===== Badges ===== */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-unknown { background: #e5e7eb; color: #4b5563; }
.badge-disponible { background: #d1fae5; color: #065f46; }
.badge-loue { background: #dbeafe; color: #1e40af; }
.badge-hors-service { background: #e5e7eb; color: #4b5563; }
.badge-en-cours { background: #dbeafe; color: #1e40af; }
.badge-en-retard { background: #fee2e2; color: #991b1b; }
.badge-rendu { background: #d1fae5; color: #065f46; }
.badge-reservee { background: #fef3c7; color: #92400e; }

/* ===== Rentals view tabs ===== */
.view-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }

/* ===== Boutique publique ===== */
.shop-hero { text-align: center; margin-bottom: 2rem; }
.shop-hero h1 { font-size: 1.75rem; font-weight: 800; }
.shop-hero p { color: var(--text-light); max-width: 40rem; margin: 0.5rem auto 0; }
.shop-banner { border-radius: var(--radius); padding: 0.875rem 1.25rem; margin-bottom: 1.5rem; font-size: 0.9375rem; }
.shop-banner.open { background: #d1fae5; color: #065f46; }
.shop-banner.closed { background: #fef3c7; color: #92400e; }
.shop-layout { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .shop-layout { grid-template-columns: 1fr 340px; } .cart-panel { position: sticky; top: 1rem; } }
.shop-cat { font-size: 1.25rem; font-weight: 700; margin: 1.5rem 0 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--green); }
.shop-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.product .pimg { position: relative; aspect-ratio: 3/4; background: #f9fafb; border-radius: 8px; overflow: hidden; }
.product .pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .25s; }
.product .pimg img + img { opacity: 0; }
.product:hover .pimg img:first-child:not(:only-child) { opacity: 0; }
.product:hover .pimg img + img { opacity: 1; }
.product .pbadge { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 1; background: var(--green); color: #fff; font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 9999px; }
.product h3 { font-size: 1rem; font-weight: 700; }
.product .pdesc { font-size: 0.8125rem; color: var(--text-light); }
.product .pprice { font-weight: 800; color: var(--green); }
.product .pprice.soon { color: var(--text-light); font-weight: 500; font-size: 0.875rem; }
.product select, .product input[type=text], .product input[type=number] { width: 100%; padding: 0.4rem 0.5rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 0.875rem; }
.product .row { display: flex; gap: 0.5rem; }
.cart-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.cart-panel h2 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.75rem; }
.cart-line { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.875rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.cart-line small { display: block; color: var(--text-light); }
.cart-total { display: flex; justify-content: space-between; font-weight: 800; margin: 0.75rem 0; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
