/* ============================================================
   MAIN.CSS — Variables, Reset, Typography, Utilities
   Les Greniers du Saïss
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Primary (blue) */
  --color-primary:        #2B4BA0;
  --color-primary-dark:   #1e3578;
  --color-primary-deeper: #0A1438;
  --color-primary-light:  #3a5fc2;

  /* Gold */
  --color-gold:       #E8B84B;
  --color-gold-dark:  #c99930;
  --color-gold-light: #f5d07a;

  /* Dark backgrounds (scroll-story, map, footer) */
  --color-ink:   #0B1A5C;

  /* Neutral */
  --color-white:      #FFFFFF;
  --color-bg:         #F3EFE6;
  --color-text:       #1C1C2E;
  --color-text-muted: #5a5a72;
  --color-border:     #e0e0ec;
  --color-overlay:    rgba(27, 40, 90, 0.62);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-label:   'Outfit', system-ui, sans-serif;

  /* Radii */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.14);

  /* Transitions */
  --transition:   0.22s ease;
  --ease-spring:  cubic-bezier(.34,1.56,.64,1);
  --ease-out:     cubic-bezier(.22,1,.36,1);

  /* Layout */
  --max-width:  1200px;
  --section-py: 5rem;
  --section-px: 1.5rem;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.15rem; font-weight: 600; }

p { max-width: 68ch; }

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--color-primary);
  margin-bottom: .5rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  max-width: 60ch;
}

.section-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-gold-dark);
  margin-bottom: .6rem;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .72rem 1.6rem;
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(43,75,160,.3);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 6px 20px rgba(43,75,160,.4);
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-primary-dark);
  box-shadow: 0 4px 14px rgba(232,184,75,.35);
}
.btn-gold:hover {
  background: var(--color-gold-dark);
  box-shadow: 0 6px 20px rgba(232,184,75,.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,.7);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--color-white);
}

.btn-outline-primary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline-primary:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ── Layout Utilities ───────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

.section {
  padding: var(--section-py) var(--section-px);
}

.section--bg {
  background: var(--color-bg);
}

.section--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.section--dark {
  background: var(--color-text);
  color: var(--color-white);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.text-muted { color: var(--color-text-muted); }
.text-gold { color: var(--color-gold); }
.text-primary { color: var(--color-primary); }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .8rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.badge--gold { background: var(--color-gold-light); color: var(--color-gold-dark); }
.badge--blue { background: rgba(43,75,160,.12); color: var(--color-primary); }
.badge--green { background: #e6f4ea; color: #2d7a3a; }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  width: 56px;
  height: 4px;
  background: var(--color-gold);
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
}
.divider--center { margin-left: auto; margin-right: auto; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --section-py: 3.5rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hide-mobile { display: none !important; }
}
@media (max-width: 480px) {
  :root { --section-py: 2.5rem; --section-px: 1rem; }
}
