
/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* ── Brand palette ── */
  --navy:            #0F1B2D;
  --navy-mid:        #1C3150;
  --amber:           #E8942A;
  --amber-light:     #F5B84A;

  /* Primary action color (terracotta / burnt orange) */
  --terracotta:      #C1440E;
  --terracotta-hover:#A83A0C;
  --terra-h:         #A83A0C;  /* alias for --terracotta-hover */
  --terra-dim:       rgba(193,68,14,0.08);
  --terra-mid:       rgba(193,68,14,0.14);

  /* Accent colors */
  --saffron:         #E8A020;
  --saffron-dim:     rgba(232,160,32,0.1);
  --teal:            #0D7377;
  --teal-light:      #14AFAF;
  --teal-dim:        rgba(13,115,119,0.08);
  --teal-mid:        rgba(13,115,119,0.14);
  --green:           #1A7A4A;
  --green-dim:       rgba(26,122,74,0.09);

  /* Neutrals */
  --cream:           #FAF7F0;
  --cream-dark:      #F0EAE0;
  --cream-mid:       #F5F0E8;
  --white:           #FFFFFF;
  --charcoal:        #1C1C1E;
  --mid:             #4A4A4E;
  --muted:           #74747A;
  --light:           #B0B0B8;

  /* Semantic */
  --ink:             #1A1A1A;
  --ink-mid:         #4A4A4A;
  --ink-light:       #8A8A8A;
  --border:          #EDE8DF;
  --border-dark:     #DDD8CF;
  --success:         #2D8A5A;
  --error:           #C4304A;

  /* Typography — Cairo covers Arabic (Darija), French, and English */
  --font:            'Cairo', sans-serif;

  /* Shape */
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(15,27,45,0.08);
  --shadow:     0 4px 16px rgba(15,27,45,0.12);
  --shadow-lg:  0 12px 40px rgba(15,27,45,0.16);

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font);
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Utilities ──────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: var(--white);
}
.btn-primary:hover { background: var(--amber-light); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--navy); background: var(--cream-dark); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-ghost {
  background: transparent;
  color: var(--ink-mid);
  border: none;
  padding: 0.5rem 0.75rem;
}
.btn-ghost:hover { color: var(--navy); background: var(--cream-dark); }

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Form elements ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-group label { font-size: 0.85rem; font-weight: 600; color: var(--navy); }

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
}
.input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(232,148,42,0.12); }
.input::placeholder { color: var(--ink-light); }

select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238A8A8A' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }

/* ── Cards ──────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* ── Badge ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-amber { background: rgba(232,148,42,0.12); color: #B96D10; }
.badge-navy  { background: rgba(15,27,45,0.08);   color: var(--navy); }
.badge-green { background: rgba(45,138,90,0.1);   color: var(--success); }
.badge-red   { background: rgba(196,48,74,0.1);   color: var(--error); }

/* ── Alert ──────────────────────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}
.alert-error   { background: rgba(196,48,74,0.08);  color: var(--error);   border: 1px solid rgba(196,48,74,0.2); }
.alert-success { background: rgba(45,138,90,0.08);  color: var(--success); border: 1px solid rgba(45,138,90,0.2); }

/* ── Section title ──────────────────────────────────────────────────── */
.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

/* ── Loading spinner ────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(232,148,42,0.2);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ────────────────────────────────────────────────────────── */
.divider {
  display: flex; align-items: center; gap: 1rem;
  color: var(--ink-light); font-size: 0.85rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Day mask display ──────────────────────────────────────────────── */
.days { display: flex; gap: 4px; }
.day {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.7rem; font-weight: 700;
  background: var(--cream-dark);
  color: var(--ink-light);
}
.day.active { background: var(--amber); color: white; }

/* ── Map container ──────────────────────────────────────────────────── */
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }

/* ── Scrollbar ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-light); }

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,27,45,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 1rem;
}
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; }
.modal-body {
  padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
}
.modal-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 0.75rem;
}

/* ── Form row (two-column grid) ─────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

/* ── Zellige decorative stripe ──────────────────────────────────────── */
.zellige-stripe {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--terracotta) 0px,    var(--terracotta) 20px,
    var(--saffron)    20px,   var(--saffron)    40px,
    var(--teal)       40px,   var(--teal)       60px,
    var(--cream-dark) 60px,   var(--cream-dark) 80px
  );
}

/* ── Page fade-in ───────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.2s; }
.fade-up-3 { animation-delay: 0.3s; }
