/* ============================================
   Sacko Service — Thème CSS
   ============================================ */

:root {
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --green-500: #22c55e;
  --white: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--slate-900);
  background: var(--white);
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
img, svg { display: block; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.gradient-text {
  background: linear-gradient(90deg, var(--orange-400), var(--red-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-brand {
  background: linear-gradient(90deg, var(--orange-400), var(--red-500));
}

.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--orange-400), var(--red-500));
}
.icon-badge svg { color: white; width: 28px; height: 28px; }

/* ---------- Navbar ---------- */
.navbar {
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
  color: white;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  max-width: 1280px;
  margin: 0 auto;
}
.brand {
  font-size: 1.5rem;
  font-weight: 800;
}
.nav-links {
  display: none;
  gap: 2rem;
  align-items: center;
}
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--orange-400); }

.cart-btn {
  position: relative;
  background: var(--orange-500);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background .2s;
}
.cart-btn:hover { background: var(--orange-600); }
.cart-btn.icon-only { background: transparent; padding: 0; }

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--red-600);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-controls { display: flex; align-items: center; gap: 1rem; }
.icon-btn { background: none; border: none; color: white; }

.mobile-menu {
  display: none;
  background: var(--slate-800);
  padding: 1rem;
  flex-direction: column;
  gap: 0.75rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a:hover { color: var(--orange-400); }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .mobile-controls { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800), var(--slate-900));
  color: white;
  padding: 5rem 1rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 1.5rem;
}
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; } }
.hero p {
  font-size: 1.25rem;
  color: var(--slate-300);
  max-width: 640px;
  margin: 0 auto 2rem;
}
.btn-primary {
  background: linear-gradient(90deg, var(--orange-400), var(--red-500));
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: scale(1.05); box-shadow: 0 10px 25px rgba(0,0,0,0.25); }

/* ---------- Sections generic ---------- */
section { padding: 5rem 1rem; }
.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin: 0 0 1rem;
}
.section-subtitle {
  text-align: center;
  color: var(--slate-500);
  max-width: 640px;
  margin: 0 auto 4rem;
}
.bg-alt { background: var(--slate-50); }

/* ---------- Services / Products grid ---------- */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px) and (max-width: 1023px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: box-shadow .3s, transform .3s;
}
.card:hover { box-shadow: 0 15px 30px rgba(0,0,0,0.1); transform: translateY(-6px); }
.card h3 { font-size: 1.25rem; font-weight: 700; margin: 0 0 0.75rem; }
.card p { color: var(--slate-500); margin: 0; }

.product-card {
  background: white;
  border: 1px solid var(--slate-300);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.08); transform: translateY(-4px); }
.product-thumb {
  height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--orange-100), var(--red-100));
}
.product-body { padding: 1.5rem; }
.product-body h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.5rem; }
.product-body p { font-size: 0.9rem; color: var(--slate-500); margin: 0 0 1rem; }
.product-footer { display: flex; justify-content: space-between; align-items: center; }
.price { font-size: 1.35rem; font-weight: 800; color: var(--orange-500); }
.add-btn {
  background: var(--orange-500);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  display: flex;
  transition: background .2s;
}
.add-btn:hover { background: var(--orange-600); }

/* ---------- Portfolio ---------- */
.portfolio-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: box-shadow .3s;
}
.portfolio-card:hover { box-shadow: 0 15px 30px rgba(0,0,0,0.12); }
.portfolio-thumb {
  height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--orange-100), var(--red-100));
  transition: transform .3s;
}
.portfolio-card:hover .portfolio-thumb { transform: scale(1.1); }
.portfolio-body { padding: 1.5rem; }
.category-tag { font-size: 0.85rem; font-weight: 700; color: var(--orange-500); text-transform: uppercase; }
.portfolio-body h3 { margin: 0.5rem 0 0; font-size: 1.25rem; font-weight: 700; }

/* ---------- CTA ---------- */
.cta {
  background: linear-gradient(90deg, var(--orange-400), var(--red-500));
  color: white;
  text-align: center;
}
.cta h2 { font-size: 2.25rem; font-weight: 800; margin: 0 0 1.5rem; }
.cta p { font-size: 1.125rem; opacity: .9; margin: 0 0 2rem; }
.btn-white {
  background: white;
  color: var(--orange-500);
  border: none;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  transition: background .2s;
}
.btn-white:hover { background: var(--slate-100); }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--slate-50);
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  text-align: center;
}
.contact-card h3 { margin: 0 0 0.5rem; }
.contact-card p { color: var(--slate-500); margin: 0; }

.contact-form-wrap {
  background: var(--slate-50);
  border-radius: 0.75rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  padding: 2rem;
  max-width: 640px;
  margin: 3rem auto 0;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; }
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-300);
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--orange-400); }
.submit-btn {
  width: 100%;
  background: linear-gradient(90deg, var(--orange-400), var(--red-500));
  color: white;
  border: none;
  padding: 0.85rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  transition: box-shadow .2s;
}
.submit-btn:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

/* ---------- Footer ---------- */
.footer {
  background: var(--slate-900);
  color: var(--slate-300);
  padding: 3rem 1rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer h3 { color: white; font-size: 1.5rem; margin: 0 0 1rem; }
.footer h4 { color: white; margin: 0 0 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.5rem; }
.footer a:hover { color: var(--orange-400); }
.footer-bottom {
  border-top: 1px solid var(--slate-700);
  padding-top: 2rem;
  text-align: center;
}

/* ---------- Cart Sidebar ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}
.overlay.open { display: block; }
.overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.cart-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 100%;
  max-width: 28rem;
  background: white;
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--slate-100);
}
.cart-header h2 { margin: 0; font-size: 1.5rem; }
.close-btn { background: none; border: none; color: var(--slate-500); }
.close-btn:hover { color: var(--slate-900); }

.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-empty { text-align: center; color: var(--slate-500); padding: 2rem 0; }

.cart-item { border: 1px solid var(--slate-300); border-radius: 0.5rem; padding: 1rem; margin-bottom: 1rem; }
.cart-item-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; }
.cart-item-top h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.cart-item-top .price { font-size: 1rem; }
.remove-btn { background: none; border: none; color: var(--red-500); }
.remove-btn:hover { color: var(--red-600); }

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--slate-100);
  border-radius: 0.375rem;
  width: fit-content;
}
.qty-control button { background: none; border: none; padding: 0.4rem; display: flex; }
.qty-control button:hover { background: var(--slate-300); }
.qty-control span { padding: 0 0.5rem; font-weight: 600; }

.cart-footer { border-top: 1px solid var(--slate-100); padding: 1.5rem; }
.cart-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; }
.cart-total .price { color: var(--orange-500); }
.checkout-btn {
  width: 100%;
  background: linear-gradient(90deg, var(--orange-400), var(--red-500));
  color: white;
  border: none;
  padding: 0.85rem;
  border-radius: 0.5rem;
  font-weight: 700;
}
.checkout-btn:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

/* ---------- Modal (checkout / confirmation) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  padding: 1rem;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  max-width: 42rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--slate-100);
  position: sticky;
  top: 0;
  background: white;
}
.modal-header h2 { margin: 0; font-size: 1.5rem; }
.modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }

.summary-box { background: var(--slate-50); border-radius: 0.5rem; padding: 1rem; }
.summary-box h3 { margin: 0 0 1rem; }
.summary-line { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.summary-total { border-top: 1px solid var(--slate-300); padding-top: 1rem; display: flex; justify-content: space-between; font-weight: 800; font-size: 1.1rem; }

.field-group { display: flex; flex-direction: column; gap: 0.75rem; }
.field-group input {
  padding: 0.6rem 1rem;
  border: 1px solid var(--slate-300);
  border-radius: 0.5rem;
  font-family: inherit;
}
.field-group input:focus { outline: none; border-color: var(--orange-400); }

.payment-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 768px) { .payment-grid { grid-template-columns: repeat(5, 1fr); } }
.payment-option {
  padding: 1rem;
  border-radius: 0.5rem;
  border: 2px solid var(--slate-300);
  background: white;
  text-align: center;
  transition: transform .15s, border-color .15s;
}
.payment-option:hover { border-color: var(--orange-400); transform: scale(1.03); }
.payment-option.selected { border-color: var(--orange-500); background: var(--orange-50); }
.payment-option .emoji { font-size: 1.75rem; margin-bottom: 0.5rem; }
.payment-option p { margin: 0; font-size: 0.75rem; font-weight: 600; }

.payment-details {
  background: var(--slate-900);
  color: white;
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 0.9rem;
}
.payment-details p { margin: 0.35rem 0; }
.payment-details .hint { font-size: 0.75rem; opacity: .9; margin-top: 0.75rem; }

.modal-actions { display: flex; gap: 0.75rem; }
.btn-outline {
  flex: 1;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--slate-300);
  border-radius: 0.5rem;
  background: white;
  font-weight: 700;
}
.btn-outline:hover { background: var(--slate-50); }
.btn-pay {
  flex: 1;
  background: linear-gradient(90deg, var(--orange-400), var(--red-500));
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
}
.btn-pay:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

/* ---------- Confirmation ---------- */
.confirm-box { text-align: center; padding: 2rem; max-width: 28rem; }
.confirm-icon {
  background: var(--green-500);
  border-radius: 999px;
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.confirm-icon svg { color: white; width: 48px; height: 48px; }
.confirm-box h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.confirm-box > p { color: var(--slate-500); margin: 0 0 1rem; }
.order-number-box { background: var(--slate-50); border-radius: 0.5rem; padding: 1rem; margin-bottom: 1.5rem; }
.order-number-box p:first-child { font-size: 0.85rem; color: var(--slate-500); margin: 0; }
.order-number-box p:last-child { font-size: 1.25rem; font-weight: 800; color: var(--orange-500); margin: 0.25rem 0 0; }
.confirm-box .small { font-size: 0.85rem; color: var(--slate-500); }

.hidden { display: none !important; }
