/* ==========================================================================
   LINKING DEVELOPMENT HOLDING — Design System
   Charte : marine #081C37 · orange #F05A28 (extraits du logo officiel)
   Style : corporate clair, grotesque bold, accents orange — réf. accenture.com
   ========================================================================== */

/* ---------- Polices auto-hébergées ---------- */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/hanken-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('../fonts/dm-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Charte */
  --navy: #081c37;
  --navy-800: #0c2342;
  --navy-700: #122b4e;
  --navy-600: #1c3a64;
  --orange: #f05a28;
  --orange-dark: #d04413;
  --orange-text: #c4400f;   /* orange lisible en petit corps sur fond blanc */
  --orange-soft: #fdeee7;

  /* Alias hérités (dashboard) */
  --ink-950: #061427;
  --ink-900: var(--navy);
  --ink-800: var(--navy-800);
  --ink-700: var(--navy-700);
  --ink-600: var(--navy-600);
  --ivory: #f4f6fa;
  --gold: var(--orange);
  --gold-bright: #ff8a5c;
  --gold-deep: var(--orange-dark);

  /* Contexte clair (défaut) */
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --fg: #16181d;
  --fg-dim: #4a5160;
  --fg-faint: #828a9b;
  --line: #e6e8ed;
  --line-strong: #c7cdd8;
  --accent: var(--orange);
  --accent-text: var(--orange-text);
  --accent-contrast: #ffffff;

  /* Typographie */
  --font-head: 'Hanken Grotesk', 'Segoe UI', Arial, sans-serif;
  --font-sans: 'Hanken Grotesk', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'DM Mono', 'Cascadia Code', Consolas, monospace;
  --font-serif: var(--font-head); /* alias hérité */
  --text-hero: clamp(2.7rem, 6.5vw, 5.8rem);
  --text-display: clamp(2.1rem, 4.4vw, 3.6rem);
  --text-h2: clamp(1.8rem, 3.3vw, 2.9rem);
  --text-h3: clamp(1.18rem, 1.7vw, 1.42rem);
  --text-lead: clamp(1.02rem, 1.25vw, 1.19rem);
  --text-body: 1rem;
  --text-small: 0.875rem;
  --text-label: 0.78rem;

  /* Rythme */
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(3.5rem, 8vw, 6.5rem);

  /* Mouvement & finitions */
  --ease: cubic-bezier(0.25, 0.6, 0.2, 1);
  --dur: 0.45s;
  --radius: 2px;
  --header-h: 64px;
  --shadow-1: 0 1px 2px rgba(8, 28, 55, 0.05), 0 4px 14px rgba(8, 28, 55, 0.06);
  --shadow-2: 0 10px 32px rgba(8, 28, 55, 0.14);
}

/* Contexte sombre (hero, footer, dashboards) : les composants suivent. */
.theme-dark {
  --bg: var(--navy);
  --bg-alt: var(--navy-800);
  --bg-raised: var(--navy-800);
  --bg-card: var(--navy-700);
  --fg: #ffffff;
  --fg-dim: rgba(255, 255, 255, 0.74);
  --fg-faint: rgba(255, 255, 255, 0.46);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.28);
  --accent-text: #ff9468;
  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 14px 40px rgba(0, 0, 0, 0.45);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--text-body) / 1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul[class], ol[class] { list-style: none; padding: 0; }

::selection { background: var(--orange); color: #fff; }

/* ---------- Typographie ---------- */
h1, h2, h3, h4, .serif {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
h1 { font-size: var(--text-display); font-weight: 750; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); line-height: 1.25; }
h4 { font-size: 1.1rem; line-height: 1.3; }

p { max-width: 68ch; }
.lead { font-size: var(--text-lead); line-height: 1.55; color: var(--fg-dim); max-width: 58ch; }
.dim { color: var(--fg-dim); }
.faint { color: var(--fg-faint); }
.small { font-size: var(--text-small); }

/* Label de section : pastille orange + texte (signature de la référence) */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font: 500 0.8rem / 1.4 var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.8rem;
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}

/* Point final orange des grands titres */
.end { color: var(--orange); }

a { color: inherit; text-decoration: none; }
.link-gold {
  color: var(--accent-text);
  font-weight: 600;
  transition: color 0.2s var(--ease);
}
.link-gold:hover { text-decoration: underline; text-underline-offset: 3px; }

.num { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.section { padding-block: var(--section-pad); position: relative; }
.section--flush-top { padding-top: 0; }
.section--line-top { border-top: 1px solid var(--line); }

.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); display: grid; gap: 1rem; }
.section-head--split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) {
  .section-head--split { grid-template-columns: 1.2fr 1fr; gap: 3rem; }
  .section-head--split .lead { justify-self: end; }
  .section-head--split .btn { justify-self: end; }
}

.grid { display: grid; gap: clamp(1.1rem, 2.2vw, 1.75rem); }
@media (min-width: 700px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Boutons rectangulaires (réf. bain.com) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  font: 500 0.78rem / 1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
  background: transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}
.btn .arrow {
  color: var(--orange);
  font-size: 0.95em;
  transition: transform 0.2s var(--ease);
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn:hover .arrow { transform: translateX(4px); color: inherit; }
.btn--solid {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}
.btn--solid .arrow { color: #fff; }
.btn--solid:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }
.btn--small { padding: 0.6rem 1.1rem; font-size: 0.7rem; }

/* Lien texte avec flèche (réf. « Read more ») */
.more {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: 500 0.8rem / 1.4 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.more .arrow { transition: transform 0.2s var(--ease); }
.more:hover .arrow { transform: translateX(4px); }

/* ---------- Tags : chips contourées (réf. bain.com) ---------- */
.tag {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font: 500 0.7rem / 1.4 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-dim);
  white-space: nowrap;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.tag--accent { border-color: var(--orange); color: var(--orange-text); }
.theme-dark .tag--accent { border-color: var(--orange); color: #ff9468; }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 0.45rem; margin-bottom: 1.3rem; }
.field label { font: 600 var(--text-small) / 1.3 var(--font-sans); color: var(--fg); }
.field .help { font-size: 0.8rem; color: var(--fg-faint); }
.field .errors { color: #c0392b; font-size: var(--text-small); }
.theme-dark .field .errors { color: #ff9d8a; }
.input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--fg);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(8, 28, 55, 0.12); }
.theme-dark .input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240, 90, 40, 0.25); }
.input::placeholder { color: var(--fg-faint); }
textarea.input { resize: vertical; min-height: 120px; }
select.input option { background: var(--bg-raised); color: var(--fg); }
.checkbox { width: 1.1rem; height: 1.1rem; accent-color: var(--orange); }
.checkbox-list { display: grid; gap: 0.4rem; }
.checkbox-list li, .checkbox-list div { display: flex; gap: 0.5rem; align-items: center; }

/* ---------- Cartes ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-media--placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(125deg, var(--navy) 0%, var(--navy-700) 70%, var(--navy-600) 100%);
  overflow: hidden;
}
.card-media--placeholder span {
  font: 800 clamp(5rem, 9vw, 8rem) / 1 var(--font-head);
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.28);
  user-select: none;
}
.card-media--placeholder::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38%;
  height: 6px;
  background: var(--orange);
}
.card-body { padding: 1.4rem 1.4rem 1.6rem; display: grid; gap: 0.65rem; align-content: start; }

/* ---------- Accessibilité ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 999;
  padding: 0.8rem 1.2rem;
  background: var(--orange);
  color: #fff;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Utilitaires ---------- */
.flow > * + * { margin-top: 1.1em; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 2rem; } .mt-4 { margin-top: 3rem; }
.text-center { text-align: center; }
.divider { border: none; border-top: 1px solid var(--line); margin-block: 2rem; }
