/* ==========================================================
   public/css/base.css
   Reset + design tokens + typographie
   ========================================================== */

:root {
  /* Palette héritée de l'original mais avec des nuances modernes */
  --teal-50:   #effaf9;
  --teal-100:  #d6f1ef;
  --teal-200:  #b1e3df;
  --teal-300:  #7eccc7;
  --teal-400:  #4ab1ad;
  --teal-500:  #008080;   /* teal canonique */
  --teal-600:  #006b6b;
  --teal-700:  #0d5761;   /* teal sombre signature */
  --teal-800:  #0a4148;
  --teal-900:  #073035;

  --rose-50:   #fff0f3;
  --rose-100:  #ffd9e0;
  --rose-200:  #ffb1bf;
  --rose-300:  #ff7d96;
  --rose-400:  #f04d6c;
  --rose-500:  #dc143c;   /* crimson canonique pour femmes */
  --rose-600:  #b80f31;
  --rose-700:  #8e0a25;

  --cyan-500:  #008b8b;   /* darkcyan pour hommes */
  --cyan-600:  #006e6e;

  /* Sémantique fonctionnelle */
  --c-male:        var(--cyan-500);
  --c-male-dark:   var(--cyan-600);
  --c-female:      var(--rose-500);
  --c-female-dark: var(--rose-700);

  --c-success: #16a34a;
  --c-success-bg: #dcfce7;
  --c-warning: #ca8a04;
  --c-warning-bg: #fef9c3;
  --c-danger:  #dc2626;
  --c-danger-bg: #fee2e2;
  --c-info:    var(--teal-700);

  /* Texte / fond */
  --c-bg:          #f5efe6;
  --c-bg-pattern:  rgba(13, 87, 97, 0.03);
  --c-surface:     #ffffff;
  --c-surface-2:   #fafaf7;
  --c-overlay:     rgba(255, 255, 255, 0.92);
  --c-overlay-tint: rgba(245, 239, 230, 0.94);

  --c-text:        #1a2424;
  --c-text-muted:  #5a6a6a;
  --c-text-subtle: #8a9595;
  --c-text-on-dark: #ffffff;

  --c-border:      #e2e0d8;
  --c-border-strong: rgba(13, 87, 97, 0.2);
  --c-divider:     #ecebe4;

  /* Typographie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'SF Mono', Menlo, Consolas, monospace;

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

  /* Rayons */
  --r-sm: 0.375rem;
  --r-md: 0.625rem;
  --r-lg: 1rem;
  --r-xl: 1.5rem;
  --r-pill: 999px;

  /* Ombres */
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --sh-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --sh-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
  --sh-xl: 0 24px 48px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);
  --sh-glow: 0 0 0 3px rgba(0, 128, 128, 0.18);

  /* Transitions */
  --t-fast:   120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:   200ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   320ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --navbar-h: 60px;
  --sidebar-w: 320px;
  --container-max: 1400px;

  /* Z-index */
  --z-nav: 50;
  --z-drawer: 60;
  --z-modal: 70;
  --z-toast: 80;
  --z-tooltip: 90;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-text);
  background-color: var(--c-bg);
  background-image:
    radial-gradient(circle at 25% 10%, rgba(95, 158, 160, 0.10), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(220, 20, 60, 0.05), transparent 40%),
    url(/images/familyback2.svg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: var(--teal-700); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--teal-500); }

p { line-height: 1.65; }
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.875rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

::selection {
  background: var(--teal-200);
  color: var(--teal-900);
}

/* ===== Utilitaires ===== */
.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;
}
.text-center { text-align: center; }
.text-muted  { color: var(--c-text-muted); }
.text-subtle { color: var(--c-text-subtle); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mb-2 { margin-bottom: var(--s-2); }
.mb-4 { margin-bottom: var(--s-4); }

.w-full { width: 100%; }
.flex   { display: flex; }
.gap-2  { gap: var(--s-2); }
.gap-3  { gap: var(--s-3); }
.gap-4  { gap: var(--s-4); }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1    { flex: 1; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .show-mobile { display: none !important; }
}

/* Animations partagées */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse   { 50% { opacity: 0.5; } }
@keyframes spin    { to { transform: rotate(360deg); } }

.fade-in  { animation: fadeIn  var(--t-base) ease both; }
.slide-up { animation: slideUp var(--t-spring) ease both; }
