/* Hopcast — feuille commune des pages HopChat et des mentions légales.
   Valeurs reprises du Hopcast Design System (tokens.css / colors_and_type.css). */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('/hopchat/assets/fonts/manrope-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('/hopchat/assets/fonts/manrope-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('/hopchat/assets/fonts/manrope-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 800; font-display: swap; src: url('/hopchat/assets/fonts/manrope-latin-800-normal.woff2') format('woff2'); }

:root {
  color-scheme: light; /* le design system ne définit qu'un thème clair */

  --hop-blue-900: #263245;
  --hop-blue-800: #334258;
  --hop-blue-700: #3f5271;
  --hop-blue-600: #4b6286;
  --hop-blue-300: #b3bfd4;
  --hop-blue-200: #d5dce7;
  --hop-blue-100: #eaeef5;
  --hop-blue-50:  #f4f6fa;
  --hop-orange-900: #8a5f10;
  --hop-orange-500: #e8a838;
  --hop-orange-100: #fcf2dc;
  --hop-gray-800: #2b3545;
  --hop-gray-600: #64708a;
  --hop-gray-300: #cfd5e0;
  --hop-gray-200: #e4e8ef;
  --hop-gray-50:  #f9fafc;
  --hop-white: #ffffff;

  --bg-page: var(--hop-white);
  --bg-subtle: var(--hop-gray-50);
  --bg-brand: var(--hop-blue-600);
  --fg-primary: var(--hop-blue-800);
  --fg-body: var(--hop-gray-800);
  --fg-muted: var(--hop-gray-600);
  --fg-brand: var(--hop-blue-600);
  --fg-link: var(--hop-blue-600);
  --border-subtle: var(--hop-gray-200);
  --border-default: var(--hop-gray-300);

  --font-body: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --radius-xs: 4px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --shadow-focus: 0 0 0 3px rgba(75, 98, 134, 0.35);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;

  --content: 760px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--fg-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

/* ---------- Lien d'évitement ---------- */
.hc-skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--hop-white); color: var(--fg-primary);
  padding: 10px 16px; border-radius: var(--radius-md); font-weight: 600;
  text-decoration: none;
}
.hc-skip:focus { top: 12px; }

/* ---------- En-tête ---------- */
.hc-header {
  background: var(--bg-brand);
  color: var(--hop-white);
  border-top: 3px solid var(--hop-orange-500);
}
.hc-header-inner,
.hc-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.hc-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 72px;
}
.hc-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; border-radius: var(--radius-xs); }
.hc-brand img { height: 32px; width: auto; display: block; }
.hc-product {
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, 0.35);
  line-height: 1.2;
  margin-right: auto;
}

.hc-lang { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-pill); background: rgba(15, 22, 32, 0.22); }
.hc-lang a {
  color: var(--hop-white); text-decoration: none;
  font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 12px; border-radius: var(--radius-pill);
  transition: background var(--dur-fast) var(--ease-standard);
}
.hc-lang a:hover { background: rgba(255, 255, 255, 0.16); }

.hc-nav {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 0 16px;
  font-size: 14px;
}
.hc-nav a {
  color: var(--hop-white); text-decoration: none; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.10);
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.hc-nav a:hover { background: rgba(255, 255, 255, 0.22); }
.hc-nav a[aria-current="page"] { background: var(--hop-white); color: var(--hop-blue-800); }

.hc-header a:focus-visible,
.hc-footer a:focus-visible {
  outline: 3px solid var(--hop-orange-500); outline-offset: 2px;
}

/* ---------- Contenu ---------- */
main {
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 48px var(--gutter) 96px;
}

.lang-section { scroll-margin-top: 16px; }
.lang-section + .lang-section {
  margin-top: 72px; padding-top: 56px;
  border-top: 1px solid var(--border-subtle);
}

.lang {
  display: inline-block;
  font-size: 12px; font-weight: 700; line-height: 1.5;
  color: var(--fg-brand);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 12px;
}

h1, h2, h3 {
  font-family: var(--font-body);
  color: var(--fg-primary);
  margin: 0;
}
h1 {
  font-size: clamp(30px, 5.2vw, 44px);
  line-height: 1.12; font-weight: 800; letter-spacing: -0.025em;
  margin-bottom: 14px;
}
h2 {
  font-size: clamp(21px, 3vw, 26px);
  line-height: 1.25; font-weight: 700; letter-spacing: -0.015em;
  margin: 48px 0 12px;
  scroll-margin-top: 16px;
}
h3 {
  font-size: 18px; line-height: 1.35; font-weight: 700; letter-spacing: -0.01em;
  margin: 28px 0 8px;
}

p, li { color: var(--fg-body); }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--fg-brand); }
ol > li::marker { font-weight: 700; }
strong { color: var(--fg-primary); font-weight: 700; }

.meta {
  color: var(--fg-muted); font-size: 14px; line-height: 1.6;
  margin: 0 0 32px; padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

main a {
  color: var(--fg-link);
  text-decoration: underline;
  text-decoration-color: var(--hop-blue-300);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-standard), text-decoration-color var(--dur-fast) var(--ease-standard);
}
main a:hover { color: var(--hop-blue-800); text-decoration-color: currentColor; }
main a:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: var(--radius-xs); }

/* Encadré (carte « flush » du DS : bordure, pas d'ombre) */
.box {
  background: var(--hop-blue-50);
  border: 1px solid var(--hop-blue-100);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 24px 0;
}

/* Marqueurs à compléter (ton « warning » du DS) */
.ph {
  background: var(--hop-orange-100);
  color: var(--hop-orange-900);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Tableaux */
.table-wrap {
  margin: 16px 0 24px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.table-wrap:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
th, td {
  text-align: left; vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-wrap: anywhere;
}
tr:last-child td { border-bottom: 0; }
th { background: var(--hop-blue-50); color: var(--fg-primary); font-weight: 700; }
td { color: var(--fg-body); }

/* Sommaire (pages juridiques) */
.toc {
  margin: 0 0 8px;
  padding: 20px 22px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.toc-title {
  font-size: 12px; font-weight: 700; color: var(--fg-brand);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin: 0 0 10px;
}
.toc ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.toc li { margin: 0; padding: 3px 0; break-inside: avoid; font-size: 14px; line-height: 1.45; }
.toc a { text-decoration: none; color: var(--fg-primary); font-weight: 600; }
.toc a:hover { color: var(--fg-link); text-decoration: underline; }

hr { border: 0; height: 1px; background: var(--border-subtle); margin: 48px 0; }

/* ---------- Pied de page ---------- */
.hc-footer {
  background: var(--bg-brand);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}
.hc-footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  padding-top: 36px; padding-bottom: 36px;
}
.hc-footer img { height: 28px; width: auto; display: block; }
.hc-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hc-footer nav a { color: var(--hop-white); text-decoration: none; font-weight: 600; }
.hc-footer nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hc-copy { margin: 0; color: rgba(255, 255, 255, 0.9); font-size: 13px; width: 100%; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.2); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .hc-bar { min-height: 64px; }
  .hc-brand img { height: 26px; }
  .hc-product { font-size: 14px; padding-left: 10px; }
  .hc-brand { gap: 10px; }
  .hc-nav { gap: 6px; font-size: 13px; }
  .hc-nav a { padding: 5px 10px; }
  main { padding-top: 32px; padding-bottom: 72px; }
  h2 { margin-top: 40px; }
  .box, .toc { padding: 16px 18px; }
  .toc ol { columns: 1; }
  th, td { padding: 9px 10px; }
  .lang-section + .lang-section { margin-top: 56px; padding-top: 40px; }
}

@media print {
  .hc-header, .hc-footer, .toc, .hc-skip { display: none; }
  main { padding: 0; max-width: none; }
}
