/* ============================================================
   The Jaffa Room Service — Charte graphique
   Mobile-first, max-width 430px
   ============================================================ */

/* Variables */
:root {
  --brown:       #6B4226;
  --brown-dark:  #3D2314;
  --cream:       #F5F0E8;
  --card-bg:     #FDFAF5;
  --gold:        #C9A84C;
  --text-main:   #3D2314;
  --text-light:  #8C7B6B;
  --white:       #FDFAF5;
  --danger:      #C0392B;
  --success:     #27AE60;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: var(--text-main);
  background: var(--cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Wrapper mobile */
.phone-wrap {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ============================================================
   Hero Header
   ============================================================ */
.hero {
  background: var(--brown-dark);
  padding: 52px 24px 36px;
  text-align: center;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 24px;
  background: var(--cream);
  border-radius: 24px 24px 0 0;
}
.hero-brand {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}
.hero-sub {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  color: rgba(253,250,245,0.65);
  font-style: italic;
}
.hero-divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 14px auto 0;
}

/* ============================================================
   Header sticky (menu + panier)
   ============================================================ */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(201,168,76,0.3);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(61,35,20,0.08);
}
.sticky-header img { height: 36px; object-fit: contain; }
.cart-icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--brown-dark);
  font-size: 22px;
}
.cart-badge {
  position: absolute;
  top: -4px; right: -6px;
  background: var(--brown);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  display: none;
}
.cart-badge.show { display: flex; }

/* ============================================================
   Contenu
   ============================================================ */
.content {
  flex: 1;
  padding: 28px 20px 32px;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Boutons
   ============================================================ */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brown);
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 16px 24px;
  width: 100%;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background 0.2s;
  text-decoration: none;
  text-align: center;
}
.btn-primary:active, .btn-primary:hover { background: var(--brown-dark); }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }

.btn-auto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brown);
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 18px 20px;
  width: 100%;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: background 0.2s;
}
.btn-auto:active { background: var(--brown-dark); }

/* ============================================================
   Chips de langue
   ============================================================ */
.chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--card-bg);
  border: 1.5px solid var(--gold);
  border-radius: 24px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 600;
  transition: all 0.15s;
  box-shadow: 0 1px 4px rgba(61,35,20,0.08);
}
.chip:active, .chip.selected {
  background: var(--brown);
  color: var(--white);
  border-color: var(--brown);
}
.chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================
   Séparateurs
   ============================================================ */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(201,168,76,0.5);
}
.or-divider span {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
}

.gold-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 20px 0;
}

/* Section label */
.section-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(201,168,76,0.4);
}

/* ============================================================
   Carte item menu (horizontale)
   ============================================================ */
.menu-section { margin-bottom: 32px; }
.menu-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.menu-section-divider {
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 16px;
}

.item-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(61,35,20,0.06);
  align-items: flex-start;
}
.item-photo {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8e0d5;
}
.item-photo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  flex-shrink: 0;
  background: #e8e0d5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.item-info { flex: 1; min-width: 0; }
.item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  line-height: 1.3;
}
.item-desc {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 8px;
}
.item-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-popular { background: #FFF3CD; color: #856404; }
.badge-vegetarian { background: #D4EDDA; color: #155724; }
.badge-gluten-free { background: #CCE5FF; color: #004085; }
.badge-halal { background: #D1ECF1; color: #0C5460; }

.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--brown);
}
.btn-add {
  background: var(--brown);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-add:active { background: var(--brown-dark); }

/* Contrôle quantité dans le menu */
.qty-control {
  display: none;
  align-items: center;
  gap: 8px;
}
.qty-control.show { display: flex; }
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--brown);
  background: none;
  color: var(--brown);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.qty-num {
  font-weight: 700;
  font-size: 16px;
  min-width: 20px;
  text-align: center;
}

/* ============================================================
   Barre panier sticky
   ============================================================ */
.cart-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--brown);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 200;
  box-shadow: 0 -4px 16px rgba(61,35,20,0.2);
  cursor: pointer;
  display: none;
}
.cart-bar.show { display: flex; }
.cart-bar-info { font-size: 14px; }
.cart-bar-count { font-weight: 700; font-size: 16px; }
.cart-bar-total { font-weight: 700; font-size: 18px; }
.cart-bar-cta {
  background: var(--gold);
  color: var(--brown-dark);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

/* ============================================================
   Panier
   ============================================================ */
.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(201,168,76,0.2);
}
.cart-item-name { flex: 1; font-weight: 600; font-size: 14px; }
.cart-item-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item-price { font-weight: 700; font-size: 14px; color: var(--brown); min-width: 50px; text-align: right; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 18px;
  padding: 16px 0;
}

/* ============================================================
   Formulaire
   ============================================================ */
.form-card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(61,35,20,0.07);
  margin-top: 20px;
}
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}
.form-input, .form-textarea {
  width: 100%;
  border: 1.5px solid rgba(201,168,76,0.4);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  color: var(--text-main);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--brown); }
.form-input.error { border-color: var(--danger); }
.form-error { color: var(--danger); font-size: 12px; margin-top: 4px; display: none; }
.form-error.show { display: block; }

.payment-info {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  padding: 10px;
  border-top: 1px solid rgba(201,168,76,0.2);
  margin-top: 12px;
}

/* ============================================================
   Confirmation
   ============================================================ */
.confirm-header {
  background: var(--brown-dark);
  color: var(--white);
  text-align: center;
  padding: 44px 24px 36px;
  position: relative;
}
.confirm-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 24px;
  background: var(--cream);
  border-radius: 24px 24px 0 0;
}
.confirm-bell {
  font-size: 40px;
  animation: pulse 2s ease-in-out infinite;
  margin-bottom: 12px;
  display: block;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
}
.confirm-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
}
.confirm-brand {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.confirm-meta {
  display: flex;
  justify-content: space-around;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: center;
}
.confirm-meta-item label { font-size: 11px; color: var(--text-light); letter-spacing: 1px; text-transform: uppercase; }
.confirm-meta-item value { font-size: 18px; font-weight: 700; color: var(--text-main); display: block; margin-top: 4px; }

/* Bottom sheet */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(61,35,20,0.5);
  z-index: 300;
  display: none;
}
.overlay.show { display: block; }
.bottom-sheet {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  padding: 24px 24px 36px;
  z-index: 400;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 -8px 40px rgba(61,35,20,0.18);
}
.bottom-sheet.show { transform: translateX(-50%) translateY(0); }
.sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(201,168,76,0.4);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.sheet-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

/* Étoiles */
.stars-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.star-btn {
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.15s, transform 0.1s;
  line-height: 1;
}
.star-btn.active { opacity: 1; transform: scale(1.1); }

/* Tags feedback séjour */
.tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.tag-chip {
  background: var(--card-bg);
  border: 1.5px solid rgba(201,168,76,0.4);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  transition: all 0.15s;
  user-select: none;
}
.tag-chip.selected {
  background: var(--brown);
  border-color: var(--brown);
  color: #fff;
}

/* Toast admin */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brown-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* Merci page */
.merci-wrap {
  text-align: center;
  padding: 60px 24px;
}
.merci-icon { font-size: 56px; margin-bottom: 16px; }
.merci-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}
.merci-sub { font-size: 15px; color: var(--text-light); }
