/* ============================================================
   VitrinAI — main.css
   Design system, reset, layout, typographie
   ============================================================ */

:root {
  /* Couleurs */
  --bg:           #F8F6F1;
  --dark:         #181816;
  --accent:       #B8843A;
  --accent-dark:  #9E6E2E;
  --accent-light: #E8D5B5;
  --surface:      #FFFFFF;
  --surface-2:    #F2EFE8;
  --border:       #E4E0D8;
  --muted:        #6B6860;
  --green:        #3D8B5E;
  --green-light:  #E8F5EE;
  --red:          #C0392B;
  --eu-blue:      #003399;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --s9: 96px; --s10: 128px;

  /* Radius */
  --r-sm: 4px; --r-md: 8px; --r-lg: 16px; --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.10);
  --shadow-xl: 0 32px 80px rgba(0,0,0,0.12);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 400ms ease;

  /* Layout */
  --nav-h: 64px;
  --maxw: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ---------- Accessibilité ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--dark); color: #fff; padding: var(--s3) var(--s5);
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Typographie ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h4 { font-size: 1.2rem; }
p { color: var(--dark); }
.lead { font-size: 1.2rem; color: var(--muted); line-height: 1.7; }
.accent { color: var(--accent); }
.accent-italic { color: var(--accent); font-style: italic; }
.text-muted { color: var(--muted); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s5); }
.section { padding: var(--s10) 0; position: relative; }
.section--tight { padding: var(--s9) 0; }
.section--alt { background: var(--surface-2); }
.section--dark { background: var(--dark); color: var(--bg); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: rgba(255,255,255,0.75); }

.section-head { max-width: 720px; margin: 0 auto var(--s8); text-align: center; }
.section-head .eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s4);
}
.section-head h2 { margin-bottom: var(--s4); }
.section-head p { color: var(--muted); font-size: 1.15rem; }

.grid { display: grid; gap: var(--s5); }
.text-center { text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: var(--s9) 0 var(--s6); }
.footer a { color: rgba(255,255,255,0.7); transition: color var(--t-fast); }
.footer a:hover { color: var(--accent-light); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s7); margin-bottom: var(--s8); }
.footer-brand .logo { font-family: var(--font-display); font-size: 1.6rem; color: #fff; margin-bottom: var(--s4); }
.footer-brand p { color: rgba(255,255,255,0.6); margin-bottom: var(--s5); max-width: 280px; }
.footer-badges { display: flex; flex-direction: column; gap: var(--s3); }
.footer-badge { font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--s5); }
.footer-col ul li { margin-bottom: var(--s3); }
.footer-col ul li a { font-size: 0.95rem; }
.footer-social { display: flex; gap: var(--s3); margin-top: var(--s4); }
.footer-social a { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,0.18); border-radius: var(--r-full); display: grid; place-items: center; transition: all var(--t-fast); }
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: var(--s5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s4); font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.footer-bottom a { font-size: 0.85rem; }
.footer-bottom-links { display: flex; gap: var(--s4); flex-wrap: wrap; }

/* ---------- Legal pages ---------- */
.legal-hero { padding: calc(var(--nav-h) + 80px) 0 var(--s7); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.legal-body { max-width: 820px; margin: 0 auto; padding: var(--s8) var(--s5) var(--s10); }
.legal-body h2 { font-size: 1.6rem; margin: var(--s8) 0 var(--s4); padding-bottom: var(--s3); border-bottom: 2px solid var(--accent-light); }
.legal-body h3 { font-size: 1.2rem; margin: var(--s6) 0 var(--s3); }
.legal-body p, .legal-body li { color: var(--muted); margin-bottom: var(--s4); }
.legal-body ul { padding-left: var(--s5); list-style: disc; }
.legal-body ul li { margin-bottom: var(--s2); }
.legal-body .placeholder { background: var(--accent-light); color: var(--accent-dark); padding: 0 6px; border-radius: var(--r-sm); font-weight: 600; }
.legal-toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5) var(--s6); margin-bottom: var(--s7); }
.legal-toc h4 { font-family: var(--font-body); margin-bottom: var(--s3); }
.legal-toc ol { padding-left: var(--s5); }
.legal-toc ol li { margin-bottom: var(--s2); }
.legal-toc a { color: var(--accent-dark); }
.legal-toc a:hover { text-decoration: underline; }
.legal-updated { font-size: 0.9rem; color: var(--muted); margin-top: var(--s4); }

/* ---------- Responsive base ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .section { padding: var(--s9) 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
