/* ===========================================================================
   Éd's Monkeys Consulting — feuille de style du site
   Tokens du design system (couleurs, typo, espacements) + styles partagés.
   La mise en page propre à chaque bloc reste en style inline dans les pages.
   =========================================================================== */

/* ===========================================================================
   Éd's Monkeys — Color tokens
   Sampled from the brand logo: violet #4C38B1, magenta #D23668, yellow #FACC35,
   ink #090627. Violet is the primary accent; magenta + yellow are the
   supporting "trio" (one per the three monkeys / three services).
   =========================================================================== */

:root {
  /* --- Neutral ink ramp (indigo-tinted, from the #090627 wordmark) --- */
  --ink-900: #090627;
  --ink-800: #14102e;
  --ink-700: #221c42;
  --ink-600: #3a3460;
  --ink-500: #5b5482;
  --ink-400: #8a84a6;
  --ink-300: #b6b1cb;
  --ink-200: #d8d5e4;
  --ink-100: #eceaf3;
  --ink-50:  #f6f5fa;
  --white:   #ffffff;

  /* --- Brand violet (primary accent) --- */
  --violet-700: #3a2a8c;
  --violet-600: #4330a0;
  --violet-500: #4c38b1;
  --violet-400: #6a57c7;
  --violet-300: #9a8cdd;
  --violet-100: #e5e0f7;
  --violet-50:  #f2effb;

  /* --- Brand magenta (secondary) --- */
  --magenta-600: #b82a57;
  --magenta-500: #d23668;
  --magenta-400: #e05c86;
  --magenta-100: #fbe2eb;

  /* --- Brand yellow (secondary / highlight) --- */
  --yellow-600: #e6b41c;
  --yellow-500: #facc35;
  --yellow-400: #fbd75e;
  --yellow-100: #fef4d4;

  /* --- Semantic raw --- */
  --green-500: #2e9e6b;
  --green-100: #e0f3ea;
  --red-500:   #d9534f;
  --red-100:   #fae6e5;
  --blue-500:  #3b6fe0;
  --blue-100:  #e3ecfc;

  /* =========================================================================
     Semantic aliases — reference these in components, never the raw ramps
     ========================================================================= */

  /* Text */
  --text-primary:   var(--ink-900);
  --text-secondary: var(--ink-500);
  --text-tertiary:  var(--ink-400);
  --text-disabled:  var(--ink-300);
  --text-inverse:   var(--white);
  --text-accent:    var(--violet-600);
  --text-link:      var(--violet-600);

  /* Surfaces */
  --surface-page:    var(--white);
  --surface-card:    var(--white);
  --surface-sunken:  var(--ink-50);
  --surface-raised:  var(--white);
  --surface-inverse: var(--ink-900);
  --surface-accent:  var(--violet-500);
  --surface-accent-tint: var(--violet-100);

  /* Borders */
  --border-subtle:  var(--ink-100);
  --border-default: var(--ink-200);
  --border-strong:  var(--ink-300);
  --border-inverse: var(--ink-700);

  /* Accent / interaction (violet — dark, so text on it is white) */
  --accent:        var(--violet-500);
  --accent-hover:  var(--violet-600);
  --accent-press:  var(--violet-700);
  --accent-tint:   var(--violet-100);
  --on-accent:     var(--white);

  /* Brand trio — for the three-monkey / three-service motif */
  --brand-violet:  var(--violet-500);
  --brand-magenta: var(--magenta-500);
  --brand-yellow:  var(--yellow-500);

  /* Focus */
  --focus-ring: rgba(76, 56, 177, 0.40);

  /* Semantic */
  --success:      var(--green-500);
  --success-tint: var(--green-100);
  --danger:       var(--red-500);
  --danger-tint:  var(--red-100);
  --warning:      var(--yellow-600);
  --warning-tint: var(--yellow-100);
  --info:         var(--blue-500);
  --info-tint:    var(--blue-100);
}

/* ===========================================================================
   Éd's Monkeys — Typography tokens
   Montserrat for everything (geometric, clean, Apple-developer adjacent).
   Mono uses the Apple/system mono stack.
   =========================================================================== */


:root {
  /* Families */
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Weights */
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-black:    800;

  /* Type scale (px) */
  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  30px;
  --text-3xl:  38px;
  --text-4xl:  48px;
  --text-5xl:  64px;
  --text-6xl:  80px;

  /* Line heights */
  --leading-tight:   1.05;
  --leading-snug:    1.2;
  --leading-normal:  1.45;
  --leading-relaxed: 1.65;

  /* Letter spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.015em;
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-caps:    0.12em;  /* for small uppercase eyebrows / labels */
}

/* ===========================================================================
   Éd's Monkeys — Spacing, radius, shadow, motion, layout tokens
   4px base grid.
   =========================================================================== */

:root {
  /* Spacing — 4px base */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  --space-40: 160px;

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

  /* Border widths */
  --border-width: 1px;
  --border-width-strong: 1.5px;

  /* Shadows — soft, Apple-clean. Cool ink-tinted, never pure black. */
  --shadow-xs: 0 1px 2px rgba(21, 23, 28, 0.06);
  --shadow-sm: 0 1px 3px rgba(21, 23, 28, 0.08), 0 1px 2px rgba(21, 23, 28, 0.04);
  --shadow-md: 0 4px 12px rgba(21, 23, 28, 0.08), 0 2px 4px rgba(21, 23, 28, 0.04);
  --shadow-lg: 0 12px 32px rgba(21, 23, 28, 0.10), 0 4px 8px rgba(21, 23, 28, 0.05);
  --shadow-xl: 0 24px 64px rgba(21, 23, 28, 0.14), 0 8px 16px rgba(21, 23, 28, 0.06);
  --shadow-accent: 0 8px 24px rgba(76, 56, 177, 0.34);

  /* Motion — calm, confident ease-out (Apple feel). No bounce. */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1); /* @kind other */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* @kind other */
  --duration-fast:   140ms; /* @kind other */
  --duration-normal: 240ms; /* @kind other */
  --duration-slow:   420ms; /* @kind other */

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 760px;
  --gutter: 24px;
}

/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  padding: 10px 16px; border-radius: var(--radius-md);
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------------------
   Boutons (ex-composant Button du design system)
   --------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 44px; padding: 0 20px;
  font-family: var(--font-sans); font-size: var(--text-base); font-weight: 600;
  letter-spacing: -0.005em; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--radius-md);
  text-decoration: none; cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-lg { height: 52px; padding: 0 26px; gap: 10px; font-size: var(--text-md); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-card); color: var(--text-primary); border-color: var(--border-default); }
.btn-secondary:hover { background: var(--surface-sunken); border-color: var(--border-strong); }
.btn-inverse { background: var(--surface-inverse); color: var(--text-inverse); }
.btn-inverse:hover { background: var(--ink-800); }

/* ---------------------------------------------------------------------------
   Sélecteur de langue (liens réels vers / et /en/, sans JavaScript)
   --------------------------------------------------------------------------- */
.em-lang-widget { position: relative; }
.em-lang-widget summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 10px; cursor: pointer;
  border: 1px solid var(--border-subtle); border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: background var(--duration-fast) var(--ease-out);
}
.em-lang-widget summary::-webkit-details-marker { display: none; }
.em-lang-widget summary:hover { background: var(--surface-sunken); }
.em-flag { display: inline-flex; width: 18px; height: 13px; border-radius: 3px; overflow: hidden; line-height: 0; flex: none; }
.em-lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; min-width: 150px; padding: 4px;
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
}
.em-lang-option {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text-primary); text-decoration: none;
}
.em-lang-option:hover, .em-lang-option.is-active { background: var(--surface-sunken); }
.em-lang-option.is-active { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
