/* ================================================================
   MATSOT TORAH-BOX — Feuille de style
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Outfit:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --ink:            #2A1800;
  --ink-mid:        #4A2C0A;
  --ink-soft:       #7A5020;
  --gold:           #C49A22;
  --gold-bright:    #D4A827;
  --gold-warm:      #E8BA40;
  --gold-tint:      #FDF4DC;
  --gold-pale:      #FEF9EC;
  --wheat:          #F5E9C8;
  --wheat-dark:     #E8D4A0;
  --cream:          #FFFDF5;
  --parchment:      #FAF0D0;
  --parchment-dark: #EDD9A0;
  --stone:          #9A845A;
  --stone-light:    #C8B082;
  --stone-pale:     #EDE0C0;
  --linen:          #FBF6E8;
  --green:          #1A5C32;
  --green-bg:       #E6F4EC;
  --red:            #8B1A1A;
  --red-bg:         #FDF0F0;
  --shadow-xs:      0 1px 6px rgba(42,24,0,0.06);
  --shadow-sm:      0 2px 18px rgba(42,24,0,0.09);
  --shadow-md:      0 6px 36px rgba(42,24,0,0.11);
  --shadow-lg:      0 16px 64px rgba(42,24,0,0.14);
  --r:    18px;
  --r-sm: 11px;
  --r-xs: 7px;
}

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

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

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--stone-pale); border-radius: 2px; }

/* ── Layout ── */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 680px;
  margin: 0 auto;
}

/* ── Header ── */
.header {
  background: var(--parchment);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1.5px solid var(--wheat-dark);
  box-shadow: var(--shadow-xs);
}

.header-logo {
  height: 48px;
  width: auto;
  display: block;
}

/* ── Hero ── */
.hero { position: relative; overflow: hidden; background: var(--parchment); }

.hero-photos {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 200px;
}

@media (min-width: 500px) { .hero-photos { height: 250px; } }

.hero-ph { overflow: hidden; position: relative; }

.hero-ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-ph:nth-child(1) img { object-position: center 35%; }
.hero-ph:nth-child(2) img { object-position: center 45%; }
.hero-ph:nth-child(3) img { object-position: center 25%; }
.hero-ph:not(:last-child) { border-right: 2px solid rgba(255,248,220,0.7); }
.hero-ph::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,248,210,0.08);
}

.hero-banner {
  background: linear-gradient(160deg, #FFFBEE 0%, #FDF4D0 60%, #FFF9E8 100%);
  padding: 20px 20px 16px;
  border-top: 2px solid var(--wheat-dark);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50px; right: -30px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,154,34,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 9px;
}

.eyebrow-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--ink);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.25;
}

@media (min-width: 480px) { .hero h1 { font-size: 27px; } }

.hero h1 em { font-style: italic; color: var(--gold-bright); }

.hero-tagline {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 7px;
  line-height: 1.6;
}

.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 12px;
  border: 1.5px solid;
  white-space: nowrap;
}

.chip-gold   { border-color: var(--gold);        color: var(--ink-mid); background: var(--gold-tint); }
.chip-stone  { border-color: var(--stone-pale);   color: var(--stone);   background: var(--linen); }
.chip-green  { border-color: rgba(26,92,50,0.25); color: var(--green);   background: var(--green-bg); }

.info-strip {
  background: var(--ink-mid);
  padding: 11px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  font-weight: 300;
}

.info-item strong { color: var(--gold-warm); font-weight: 500; }

.info-sep { width: 1px; height: 14px; background: rgba(255,255,255,0.14); flex-shrink: 0; }

/* ── Steps ── */
.steps-wrap {
  display: flex;
  align-items: center;
  padding: 14px 16px 0;
  margin-bottom: 4px;
}

.step-item { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }

.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s;
  flex-shrink: 0;
}

.step-circle.done    { background: var(--ink); color: var(--gold-warm); cursor: pointer; }
.step-circle.done:hover { background: var(--ink-mid); transform: scale(1.08); box-shadow: 0 0 0 4px rgba(42,24,0,0.12); }
.step-circle.active  { background: var(--gold-bright); color: var(--ink); box-shadow: 0 0 0 5px rgba(196,154,34,0.2); }
.step-circle.pending { background: var(--stone-pale); color: var(--stone); }

.step-label {
  font-size: 10px;
  color: var(--stone);
  text-align: center;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}

.step-label.clickable { cursor: pointer; color: var(--ink-soft); }

.step-line {
  flex: 1;
  height: 1px;
  background: var(--stone-pale);
  margin: 0 5px 20px;
  transition: background 0.4s;
}

.step-line.done { background: var(--ink); }

.content { padding: 12px 16px 40px; }

/* ── Card ── */
.card {
  background: #fff;
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(196,154,34,0.13);
  margin-bottom: 12px;
}

.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }

.card-icon {
  width: 34px;
  height: 34px;
  background: var(--gold-tint);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid var(--parchment-dark);
  flex-shrink: 0;
}

.card-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
}

.card-sublabel { font-size: 12px; color: var(--stone); margin-top: 1px; font-weight: 300; }

/* ── Date Grid ── */
.date-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }

@media (min-width: 420px) { .date-grid { grid-template-columns: repeat(3, 1fr); } }

.date-btn {
  position: relative;
  padding: 15px 13px 13px;
  border-radius: 13px;
  border: 1.5px solid var(--stone-pale);
  background: var(--linen);
  cursor: pointer;
  text-align: left;
  transition: all 0.22s;
  font-family: 'Outfit', sans-serif;
  outline: none;
  width: 100%;
}

.date-btn:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.date-btn.selected {
  border-color: var(--gold-bright);
  background: var(--gold-pale);
  box-shadow: 0 0 0 3px rgba(196,154,34,0.18), var(--shadow-sm);
  transform: translateY(-1px);
}

.date-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}

.date-weekday { font-size: 12px; color: var(--stone); margin-top: 2px; }

.date-month {
  font-size: 10px;
  color: var(--gold-bright);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.date-check {
  position: absolute;
  top: 10px; right: 10px;
  width: 18px; height: 18px;
  background: var(--gold-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.2s;
  font-weight: 800;
}

.date-btn.selected .date-check { opacity: 1; }

.date-count {
  position: absolute;
  bottom: 9px; right: 9px;
  font-size: 10px;
  color: var(--stone);
  background: var(--wheat);
  border-radius: 10px;
  padding: 2px 6px;
  border: 1px solid var(--stone-pale);
}

/* ── Slot Grid ── */
.slot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

@media (min-width: 380px) { .slot-grid { grid-template-columns: repeat(5, 1fr); } }

.slot-card {
  position: relative;
  border-radius: 12px;
  border: 1.5px solid var(--stone-pale);
  background: var(--linen);
  padding: 12px 6px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  overflow: hidden;
  outline: none;
}

.slot-card:not(.full):not(.blocked):hover {
  border-color: var(--gold-bright);
  background: var(--gold-pale);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.slot-card.selected {
  border-color: var(--gold-bright);
  background: var(--gold-pale);
  box-shadow: 0 0 0 3px rgba(196,154,34,0.2), var(--shadow-sm);
  transform: translateY(-2px);
}

.slot-card.full    { cursor: not-allowed; opacity: 0.45; }
.slot-card.blocked { background: rgba(139,26,26,0.03); border-color: rgba(139,26,26,0.18); cursor: not-allowed; opacity: 0.4; }

.slot-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-bright);
  transform: scaleX(0);
  transition: transform 0.25s;
  transform-origin: center;
}

.slot-card:not(.full):not(.blocked):hover .slot-bar,
.slot-card.selected .slot-bar { transform: scaleX(1); }

.slot-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s;
  line-height: 1;
}

.slot-card.selected .slot-time { color: var(--gold-bright); }

.slot-divider { width: 14px; height: 1px; background: var(--stone-pale); margin: 6px auto 5px; }
.slot-card.selected .slot-divider { background: var(--gold); }

.pips { display: flex; justify-content: center; gap: 3px; margin-bottom: 4px; }

.pip { width: 7px; height: 7px; border-radius: 50%; }
.pip.taken  { background: var(--ink-mid); opacity: 0.6; }
.pip.free   { background: var(--green); opacity: 0.7; }
.pip.warn   { background: #C47800; opacity: 0.85; }
.pip.ghost  { background: var(--stone-pale); }

.slot-status { font-size: 10px; font-weight: 500; }
.s-ok   { color: var(--green); }
.s-warn { color: #A86000; }
.s-none { color: var(--stone); }
.s-block{ color: var(--red); }

.slot-check {
  position: absolute;
  top: 5px; right: 5px;
  width: 13px; height: 13px;
  background: var(--gold-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  color: var(--ink);
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s;
}

.slot-card.selected .slot-check { opacity: 1; }

.slot-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 11px;
  background: var(--gold-pale);
  border-radius: 8px;
  font-size: 11px;
  color: var(--stone);
  border: 1px solid var(--wheat-dark);
}

.slot-legend span { display: flex; align-items: center; gap: 4px; }

/* ── Slot Summary (dans form) ── */
.slot-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--gold-tint);
  border: 1.5px solid var(--parchment-dark);
  border-radius: var(--r-sm);
  padding: 12px 15px;
  margin-bottom: 15px;
}

.ss-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--gold-bright);
  font-weight: 500;
}

.ss-sep { width: 1px; height: 28px; background: var(--parchment-dark); }
.ss-date { font-size: 13px; font-weight: 500; color: var(--ink); }
.ss-info { font-size: 12px; color: var(--stone); margin-top: 1px; font-weight: 300; }

/* ── Photo strip ── */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 15px;
  border-radius: var(--r-sm);
  overflow: hidden;
  height: 76px;
}

.photo-strip div { overflow: hidden; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Form Fields ── */
.field { margin-bottom: 13px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 6px;
}

.field-required { color: var(--gold-bright); }

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--stone-pale);
  background: var(--linen);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: var(--ink);
  transition: all 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.field-input::placeholder { color: var(--stone-light); }
.field-input:focus { border-color: var(--gold-bright); background: #fff; box-shadow: 0 0 0 4px rgba(196,154,34,0.12); }
.field-input.error { border-color: var(--red); background: var(--red-bg); }
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; }

/* ── Matsot Option ── */
.matsot-card {
  border-radius: var(--r-sm);
  border: 1.5px solid var(--stone-pale);
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  background: var(--linen);
}

.matsot-card:hover { border-color: var(--gold); }

.matsot-card.checked {
  border-color: var(--gold-bright);
  background: var(--gold-pale);
  box-shadow: 0 0 0 3px rgba(196,154,34,0.12);
}

.matsot-head { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; }

.matsot-photo {
  width: 44px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--stone-pale);
}

.matsot-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.matsot-checkbox {
  width: 20px; height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--stone-pale);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink);
}

.matsot-card.checked .matsot-checkbox { background: var(--gold-bright); border-color: var(--gold-bright); }

.matsot-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.matsot-subtitle { font-size: 12px; color: var(--stone); margin-top: 2px; font-weight: 300; }

.matsot-price {
  display: none;
  background: linear-gradient(90deg, var(--gold-tint), var(--parchment));
  border-top: 1px solid var(--parchment-dark);
  padding: 10px 14px;
  align-items: center;
  justify-content: space-between;
}

.matsot-card.checked .matsot-price { display: flex; }

.matsot-price-label { font-size: 12px; color: var(--stone); }

.matsot-price-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--gold-bright);
  font-weight: 500;
}

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  padding: 15px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--ink);
  color: #FFF9EC;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover:not(:disabled) {
  background: var(--ink-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-arrow { transition: transform 0.2s; font-family: 'Outfit', sans-serif; font-size: 16px; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.btn-secondary {
  width: 100%;
  padding: 12px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--stone-pale);
  background: var(--linen);
  color: var(--stone);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { border-color: var(--stone); color: var(--ink); }

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--stone);
  font-size: 13px;
  font-family: 'Outfit', sans-serif;
  padding: 0;
  margin-bottom: 16px;
  transition: color 0.15s;
  outline: none;
}

.btn-back:hover { color: var(--ink); }

/* ── Alert ── */
.alert {
  padding: 11px 14px;
  border-radius: var(--r-xs);
  font-size: 13px;
  margin-bottom: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid;
}

.alert-error { background: var(--red-bg); color: var(--red); border-color: rgba(139,26,26,0.15); }

/* ── Breadcrumb ── */
.breadcrumb { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--stone); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb-sep { opacity: 0.35; }
.breadcrumb-active { color: var(--ink); font-weight: 500; }

/* ── Confirmation ── */
.confirm-wrap {
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 12px;
  border: 1px solid rgba(196,154,34,0.2);
}

.confirm-hero { position: relative; height: 150px; }
.confirm-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; display: block; }

.confirm-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,248,220,0.06) 0%, rgba(42,24,0,0.52) 100%);
}

.confirm-hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 15px 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.confirm-seal {
  width: 50px; height: 50px;
  background: rgba(232,244,237,0.94);
  border: 2px solid rgba(26,92,50,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
  flex-shrink: 0;
}

.confirm-seal::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px dashed rgba(26,92,50,0.4);
}

.confirm-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; color: #fff; font-weight: 500; }
.confirm-subtitle { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; font-weight: 300; }

.confirm-body { background: var(--cream); overflow: hidden; }

.ticket-header {
  background: linear-gradient(90deg, var(--ink), var(--ink-mid));
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-header-label { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.38); }
.ticket-header-value { font-family: 'Cormorant Garamond', serif; font-size: 18px; color: var(--gold-warm); margin-top: 2px; }

.ticket-perforation {
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: var(--ink-mid);
}

.ticket-perf-circle { width: 14px; height: 14px; border-radius: 50%; background: var(--cream); flex-shrink: 0; }
.ticket-perf-line { flex: 1; border-top: 2px dashed rgba(255,255,255,0.1); }

.ticket-rows { padding: 2px 0; background: #fff; }

.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--stone-pale);
}

.ticket-row:last-child { border-bottom: none; }

.ticket-key { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--stone); }
.ticket-value { font-size: 13px; font-weight: 500; color: var(--ink); }
.ticket-value.highlight { color: var(--gold-bright); font-family: 'Cormorant Garamond', serif; font-size: 16px; }

.confirm-note {
  background: linear-gradient(90deg, var(--gold-tint), var(--gold-pale));
  border: 1.5px solid var(--parchment-dark);
  border-radius: var(--r-xs);
  padding: 11px 14px;
  font-size: 13px;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  font-weight: 500;
}

.confirm-actions { display: flex; gap: 8px; }
.confirm-actions .btn-secondary { flex: 1; }

/* ── Spinner ── */
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: #FFF9EC;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.28s, transform 0.28s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Animations ── */
.fade-in { animation: fadeUp 0.28s ease; }

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