:root {
  --primary: #ff7c3b;
  --dark: #0d1b2a;
  --light: #f7f7f7;
  --accent: #ffd166;
  --border: #e5e5e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light);
  color: var(--dark);
  min-height: 100vh;
}

.site-status,
.closed-banner {
  margin: 0 auto;
  max-width: 1200px;
  padding: 0.6rem 1.2rem;
  border-radius: 0.7rem;
  display: none;
}

.site-status {
  background: rgba(34, 197, 94, 0.15);
  color: #166534;
  font-weight: 600;
}

.site-status.closed {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.site-status p {
  margin: 0;
}

.closed-banner {
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  margin-top: 0.6rem;
}

.rupture-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
  padding: 1rem 1.2rem;
  border-radius: 0.8rem;
  box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4);
  font-weight: 600;
  z-index: 1200;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 3.5s forwards;
}

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

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.site-status.visible,
.closed-banner.visible {
  display: block;
}

.hours-closed {
  max-width: 820px;
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
  background: linear-gradient(120deg, rgba(13, 27, 42, 0.95), rgba(25, 55, 95, 0.9));
  color: #fff;
  border-radius: 1.2rem;
  box-shadow: 0 25px 45px rgba(13, 27, 42, 0.45);
}

.hours-closed.hidden {
  display: none;
}

.hours-closed-title {
  font-size: clamp(1.4rem, 4vw, 2.3rem);
  margin: 0 0 0.4rem 0;
}

.hours-closed-subtitle {
  margin: 0 0 1rem 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hours-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  align-items: baseline;
}

.hours-social a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.hours-social a:hover {
  border-color: var(--accent);
}

.page-logo {
  position: absolute;
  top: 1.2rem;
  left: 1.5rem;
  width: clamp(40px, 6vw, 64px);
  height: auto;
  z-index: 1200;
}

.hero {
  background: linear-gradient(135deg, #0d1b2a, #1b263b);
  color: #fff;
  padding: 3rem clamp(1.5rem, 4vw, 3rem);
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.hero p {
  margin-top: 0.5rem;
  opacity: 0.85;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
}
/*.container {
  display: block;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 1200px;
  margin: 0 auto;
}*/

.container {
  width: 100%;
  max-width: none; 
  padding: clamp(1.5rem, 4vw, 3rem);
  margin: 0;
}


section h2,
.sidebar h2 {
  margin-top: 0;
}

.product-grid {
  display: grid;
  gap: 1.5rem;

  /* Desktop large */
  grid-template-columns: repeat(3, 1fr);
}

/* Écrans très larges → 4 produits */
@media (min-width: 1400px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablette */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}


.product-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.product-card.unavailable {
  opacity: 0.55;
  filter: grayscale(0.3);
  pointer-events: none;
}

.product-card img {
  width: 100%;
  height: clamp(160px, 25vw, 220px);
  object-fit: cover;
  object-position: center;
  display: block;
  cursor: pointer;
}

.badge-rupture {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.product-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-price {
  font-weight: bold;
  color: var(--primary);
}

.sidebar {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: fixed;
  right: 2rem;
  top: 5rem;
  width: min(420px, calc(100% - 4rem));
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  z-index: 1000;
}

.cart-items {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.cart-item span {
  display: block;
}

.cart-total {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: right;
}

.order-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  gap: 0.3rem;
  margin-bottom: 0.75rem;
}

input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.6rem;
  font-size: 1rem;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.primary-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 0.7rem;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.hidden {
  display: none !important;
}

.sidebar-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 2rem;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #fff;
  color: var(--dark);
  font-size: 0.85rem;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.cart-toggle:focus {
  outline: 3px solid var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: #fff;
  border-radius: 1.3rem;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.15);
}

.modal-content h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--dark);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--dark);
}

.modal-field input,
.modal-field select,
.modal-field textarea {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  background: #fdfdfd;
}

.modal-field textarea {
  min-height: 110px;
}

.modal-submit {
  width: 100%;
  display: inline-flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .container {
    padding: 1.25rem;
  }

  .sidebar {
    right: 1rem;
    top: 4rem;
    width: calc(100% - 2rem);
  }

  .cart-toggle {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

@media (min-width: 1200px) {
  .container {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 380px);
    gap: 2.5rem;
    align-items: start;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 0.95rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-row {
    flex-direction: column;
  }
}
