/* ============================================================
   SAMAEVENT – Design System
   Direction : Warm Premium Sénégalais
   Mobile-first strict · App-like · PHP 7.4
   ============================================================ */

/* ─────────────────────────────────────────
   FONTS
   ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ─────────────────────────────────────────
   CSS TOKENS
   ───────────────────────────────────────── */
:root {
  /* Brand Colors */
  --color-primary:        #E0622A;   /* Teranga Orange – chaleur Dakar */
  --color-primary-dark:   #C04E1A;
  --color-primary-light:  #F5895A;
  --color-primary-soft:   #FEF0EA;

  --color-secondary:      #1A3C6E;   /* Océan Atlantique – confiance */
  --color-secondary-dark: #0F2647;
  --color-secondary-light:#2E5A9C;
  --color-secondary-soft: #EBF0F8;

  --color-accent:         #F5C842;   /* Or de la Teranga */
  --color-accent-dark:    #D4A820;
  --color-accent-soft:    #FEF9E8;

  /* Neutrals */
  --color-bg:             #FBF8F4;   /* Sable chaud */
  --color-bg-2:           #F4EFE9;
  --color-surface:        #FFFFFF;
  --color-surface-2:      #FBF8F4;
  --color-border:         #E8E0D6;
  --color-border-light:   #F0E8DF;

  /* Text */
  --color-text:           #1C1410;   /* Terre sombre */
  --color-text-2:         #5A4A3F;
  --color-text-3:         #9C8877;
  --color-text-inverse:   #FFFFFF;

  /* Semantic */
  --color-success:        #1DAB6A;
  --color-success-soft:   #E8F8F1;
  --color-warning:        #F5A623;
  --color-warning-soft:   #FEF5E8;
  --color-error:          #E8352A;
  --color-error-soft:     #FEF0EF;
  --color-info:           #2563EB;
  --color-info-soft:      #EBF0FF;

  /* Stars */
  --color-star:           #F5C842;
  --color-star-empty:     #DDD5C8;

  /* WhatsApp */
  --color-whatsapp:       #25D366;
  --color-whatsapp-dark:  #128C7E;

  /* Typography */
  --font-display:  'Syne', sans-serif;
  --font-body:     'Outfit', sans-serif;

  --text-xs:    0.70rem;   /* 11px */
  --text-sm:    0.813rem;  /* 13px */
  --text-base:  0.9375rem; /* 15px */
  --text-md:    1.0625rem; /* 17px */
  --text-lg:    1.1875rem; /* 19px */
  --text-xl:    1.375rem;  /* 22px */
  --text-2xl:   1.625rem;  /* 26px */
  --text-3xl:   2rem;      /* 32px */

  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semi:    600;
  --weight-bold:    700;
  --weight-black:   800;

  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.5;
  --leading-loose:  1.7;

  /* Spacing (base 4px) */
  --space-1:   0.25rem;   /* 4px  */
  --space-2:   0.5rem;    /* 8px  */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-2xl:  32px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(28,20,16,.06);
  --shadow-sm:  0 2px 8px rgba(28,20,16,.08);
  --shadow-md:  0 4px 16px rgba(28,20,16,.10);
  --shadow-lg:  0 8px 28px rgba(28,20,16,.12);
  --shadow-xl:  0 16px 48px rgba(28,20,16,.15);
  --shadow-card:0 2px 12px rgba(224,98,42,.08);

  /* Transitions */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   400ms;
  --duration-slower: 600ms;

  /* Layout */
  --header-h:       56px;
  --bottom-nav-h:   64px;
  --safe-bottom:    env(safe-area-inset-bottom, 0px);
  --page-pad:       var(--space-4);
  --max-content:    480px;

  /* Z-index layers */
  --z-base:       1;
  --z-sticky:     100;
  --z-dropdown:   200;
  --z-overlay:    300;
  --z-modal:      400;
  --z-toast:      500;
}

/* ─────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
  overscroll-behavior: none;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App container */
.app-wrapper {
  max-width: var(--max-content);
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  background: var(--color-bg);
  overflow-x: hidden;
  overscroll-behavior: none;
}

/* Scrollable content zone */
.page-content {
  padding-top: var(--header-h);
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + var(--space-4));
  min-height: 100vh;
}

/* No bottom nav */
.page-content--full {
  padding-bottom: var(--space-8);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font-body);
}

ul, ol { list-style: none; }

/* ─────────────────────────────────────────
   TYPOGRAPHY UTILITIES
   ───────────────────────────────────────── */
.font-display  { font-family: var(--font-display); }
.font-body     { font-family: var(--font-body); }

.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-base  { font-size: var(--text-base); }
.text-md    { font-size: var(--text-md); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-2xl   { font-size: var(--text-2xl); }
.text-3xl   { font-size: var(--text-3xl); }

.weight-light   { font-weight: var(--weight-light); }
.weight-regular { font-weight: var(--weight-regular); }
.weight-medium  { font-weight: var(--weight-medium); }
.weight-semi    { font-weight: var(--weight-semi); }
.weight-bold    { font-weight: var(--weight-bold); }
.weight-black   { font-weight: var(--weight-black); }

.text-primary   { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent    { color: var(--color-accent); }
.text-muted     { color: var(--color-text-3); }
.text-light     { color: var(--color-text-2); }
.text-inverse   { color: var(--color-text-inverse); }

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }
.line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.line-clamp-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* ─────────────────────────────────────────
   SPACING UTILITIES
   ───────────────────────────────────────── */
.pad-page    { padding-left: var(--page-pad); padding-right: var(--page-pad); }
.pad-x       { padding-left: var(--page-pad); padding-right: var(--page-pad); }
.gap-2  { gap: var(--space-2); }
.gap-3  { gap: var(--space-3); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }

.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }

/* ─────────────────────────────────────────
   FLEX / GRID UTILITIES
   ───────────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-start   { display: flex; align-items: center; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; }
.flex-none    { flex: none; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }

/* ─────────────────────────────────────────
   DISPLAY UTILITIES
   ───────────────────────────────────────── */
.hidden   { display: none !important; }
.w-full   { width: 100%; }
.h-full   { height: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
