/* =========================================================================
   ATLAS PROFILE — Design system
   -------------------------------------------------------------------------
   Palette sobre bleu profond + neutres + accent ocre.
   Typographie : Inter (body) + Source Serif 4 (titres mesurés).
   Inspiration : assessments cliniques, sobre, lisible, sans gimmick.
   ========================================================================= */

:root {
  /* ───── Couleurs ───── */
  --tp-ink:        #0d2b4d;   /* texte principal, bleu profond */
  --tp-ink-soft:   #3a5070;   /* texte secondaire */
  --tp-mut:        #6b7d96;   /* texte muted / aide */
  --tp-line:       #dde3ec;   /* bordures, séparateurs */
  --tp-line-soft:  #eef1f6;
  --tp-bg:         #fafbfd;   /* fond de page */
  --tp-surface:    #ffffff;   /* cartes, formulaires */
  --tp-surface-2:  #f3f6fa;   /* inputs, fond interne */

  --tp-accent:     #c08a3e;   /* ocre — boutons primaires, focus */
  --tp-accent-d:   #a87425;   /* ocre hover */
  --tp-accent-l:   #f0e4d0;   /* ocre clair (badges, fonds tag) */

  --tp-success:    #3c8d5f;
  --tp-warn:       #b3791d;
  --tp-error:      #b53b3b;

  /* ───── Variantes par contexte (icônes / badges) ───── */
  --tp-ctx-solo:      #4a7ec1;
  --tp-ctx-couple:    #b06aa5;
  --tp-ctx-recruiter: #5a7060;

  /* ───── Rayons et ombres ───── */
  --tp-radius:    8px;
  --tp-radius-lg: 14px;
  --tp-shadow-1:  0 1px 2px rgba(13, 43, 77, 0.06);
  --tp-shadow-2:  0 4px 14px rgba(13, 43, 77, 0.08);
  --tp-shadow-3:  0 12px 32px rgba(13, 43, 77, 0.12);

  /* ───── Espacement ───── */
  --tp-gap-xs: 6px;
  --tp-gap-s:  12px;
  --tp-gap-m:  20px;
  --tp-gap-l:  32px;
  --tp-gap-xl: 56px;

  /* ───── Typo ───── */
  --tp-font-body:  'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --tp-font-serif: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --tp-font-mono:  'JetBrains Mono', ui-monospace, monospace;
}

/* ───────── Reset léger ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--tp-font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--tp-ink);
  background: var(--tp-bg);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a {
  color: var(--tp-ink);
  text-decoration: underline;
  text-decoration-color: var(--tp-line);
  text-underline-offset: 3px;
  transition: color .15s, text-decoration-color .15s;
}
a:hover {
  color: var(--tp-accent-d);
  text-decoration-color: var(--tp-accent);
}
h1, h2, h3, h4 {
  font-family: var(--tp-font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--tp-ink);
  line-height: 1.25;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(1.8rem, 1.4rem + 1.5vw, 2.6rem); font-weight: 500; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
small { color: var(--tp-mut); }

/* ───────── Layout helpers ───────── */
.tp-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.tp-container--narrow { max-width: 720px; }
.tp-container--medium { max-width: 920px; }

.tp-section {
  padding: var(--tp-gap-xl) 0;
}
.tp-section--soft { background: var(--tp-surface-2); }

.tp-stack       { display: flex; flex-direction: column; gap: var(--tp-gap-m); }
.tp-stack--s    { gap: var(--tp-gap-s); }
.tp-stack--l    { gap: var(--tp-gap-l); }
.tp-row         { display: flex; align-items: center; gap: var(--tp-gap-s); flex-wrap: wrap; }
.tp-grid        { display: grid; gap: var(--tp-gap-m); }
.tp-grid--3     { grid-template-columns: repeat(3, 1fr); }
.tp-grid--2     { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) {
  .tp-grid--3, .tp-grid--2 { grid-template-columns: 1fr; }
}

.tp-eyebrow {
  display: inline-block;
  font-family: var(--tp-font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--tp-accent-d);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.tp-lede {
  font-size: 1.15rem;
  color: var(--tp-ink-soft);
  line-height: 1.6;
  max-width: 56ch;
}

/* ───────── Header ───────── */
.tp-hd {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tp-line);
}
.tp-hd-inner {
  display: flex; align-items: center; gap: 28px;
  padding: 14px 24px;
  max-width: 1180px; margin: 0 auto;
}
.tp-hd-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--tp-font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--tp-ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.tp-hd-logo .tp-hd-mark {
  width: 28px; height: 28px;
  background: var(--tp-ink); color: #fff;
  display: grid; place-items: center;
  font-family: var(--tp-font-serif);
  font-size: 14px; font-weight: 600;
  border-radius: 6px;
}
.tp-hd-nav { display: flex; gap: 22px; flex: 1; }
.tp-hd-nav a {
  color: var(--tp-ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
}
.tp-hd-nav a:hover { color: var(--tp-ink); }
.tp-hd-nav a.is-active {
  color: var(--tp-ink);
  border-bottom: 2px solid var(--tp-accent);
}
.tp-hd-actions { display: flex; align-items: center; gap: 12px; }
.tp-hd-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--tp-line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--tp-ink);
  font-size: 14px;
}
.tp-hd-user:hover { border-color: var(--tp-ink-soft); }
.tp-hd-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--tp-surface-2);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--tp-ink-soft);
}
.tp-hd-burger { display: none; }

@media (max-width: 800px) {
  .tp-hd-inner { gap: 16px; }
  .tp-hd-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--tp-line);
    padding: 8px 24px;
  }
  .tp-hd-nav.is-open { display: flex; }
  .tp-hd-nav a { padding: 12px 0; border-bottom: 1px solid var(--tp-line-soft); }
  .tp-hd-nav a:last-child { border-bottom: none; }
  .tp-hd-burger {
    display: grid; place-items: center;
    width: 36px; height: 36px;
    background: none; border: 1px solid var(--tp-line); border-radius: 6px;
    cursor: pointer;
  }
  .tp-hd-burger::before {
    content: ''; width: 16px; height: 2px;
    background: var(--tp-ink);
    box-shadow: 0 -5px 0 var(--tp-ink), 0 5px 0 var(--tp-ink);
  }
}

/* ───────── Buttons ───────── */
.tp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  font-family: var(--tp-font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid transparent;
  border-radius: var(--tp-radius);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s ease;
  line-height: 1.2;
}
.tp-btn:focus-visible {
  outline: 2px solid var(--tp-accent);
  outline-offset: 2px;
}
.tp-btn--primary {
  background: var(--tp-ink);
  color: #fff;
}
.tp-btn--primary:hover { background: #163b65; color: #fff; }

.tp-btn--accent {
  background: var(--tp-accent);
  color: #fff;
}
.tp-btn--accent:hover { background: var(--tp-accent-d); color: #fff; }

.tp-btn--ghost {
  background: transparent;
  color: var(--tp-ink);
  border-color: var(--tp-line);
}
.tp-btn--ghost:hover { border-color: var(--tp-ink-soft); background: var(--tp-surface-2); }

.tp-btn--link {
  background: none; border: none; padding: 0;
  color: var(--tp-ink);
  text-decoration: underline;
  text-decoration-color: var(--tp-line);
}
.tp-btn--link:hover { color: var(--tp-accent-d); text-decoration-color: var(--tp-accent); }

.tp-btn--lg { padding: 14px 28px; font-size: 15px; }
.tp-btn--block { width: 100%; }
.tp-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ───────── Cards ───────── */
.tp-card {
  background: var(--tp-surface);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius-lg);
  padding: var(--tp-gap-l);
  box-shadow: var(--tp-shadow-1);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.tp-card--interactive { cursor: pointer; }
.tp-card--interactive:hover {
  border-color: var(--tp-ink-soft);
  box-shadow: var(--tp-shadow-2);
}
.tp-card-head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 14px;
}
.tp-card-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--tp-surface-2);
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--tp-ink);
}
.tp-card-icon svg { width: 22px; height: 22px; }
.tp-card-title {
  font-family: var(--tp-font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  color: var(--tp-ink);
}
.tp-card-meta {
  font-family: var(--tp-font-mono);
  font-size: 11px;
  color: var(--tp-mut);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tp-card-text {
  color: var(--tp-ink-soft);
  font-size: 0.95rem;
  margin: 0;
}

/* ───────── Forms ───────── */
.tp-form { display: flex; flex-direction: column; gap: var(--tp-gap-m); }
.tp-field { display: flex; flex-direction: column; gap: 6px; }
.tp-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--tp-ink);
  letter-spacing: 0;
}
.tp-label-help {
  font-size: 12px;
  color: var(--tp-mut);
  font-weight: 400;
}
.tp-input, .tp-select, .tp-textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--tp-font-body);
  font-size: 15px;
  color: var(--tp-ink);
  background: var(--tp-surface);
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-radius);
  transition: border-color .15s, box-shadow .15s;
}
.tp-input:focus, .tp-select:focus, .tp-textarea:focus {
  outline: none;
  border-color: var(--tp-accent);
  box-shadow: 0 0 0 3px rgba(192, 138, 62, 0.15);
}
.tp-input--mono { font-family: var(--tp-font-mono); letter-spacing: .08em; text-transform: uppercase; }

.tp-form-error {
  background: #fdebea;
  color: var(--tp-error);
  border: 1px solid #f4c2c0;
  padding: 10px 14px;
  border-radius: var(--tp-radius);
  font-size: 14px;
}
.tp-form-info {
  background: #f0f5fb;
  color: var(--tp-ink-soft);
  border: 1px solid #d6e3f1;
  padding: 10px 14px;
  border-radius: var(--tp-radius);
  font-size: 14px;
}
.tp-form-success {
  background: #ecf5ee;
  color: var(--tp-success);
  border: 1px solid #c8e0cf;
  padding: 10px 14px;
  border-radius: var(--tp-radius);
  font-size: 14px;
}

/* ───────── Tabs (login/register) ───────── */
.tp-tabs {
  display: flex;
  border-bottom: 1px solid var(--tp-line);
  margin-bottom: var(--tp-gap-m);
}
.tp-tab {
  flex: 1;
  padding: 14px 18px;
  font-family: var(--tp-font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--tp-mut);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  text-align: center;
}
.tp-tab.is-active {
  color: var(--tp-ink);
  border-bottom-color: var(--tp-accent);
}
.tp-tab:hover:not(.is-active) { color: var(--tp-ink-soft); }

/* ───────── Hero ───────── */
.tp-hero {
  padding: var(--tp-gap-xl) 0 var(--tp-gap-l);
  background: linear-gradient(180deg, #fff 0%, var(--tp-bg) 100%);
}
.tp-hero h1 {
  max-width: 18ch;
  margin-bottom: var(--tp-gap-m);
}

/* ───────── Footer ───────── */
.tp-ft {
  border-top: 1px solid var(--tp-line);
  padding: var(--tp-gap-l) 0;
  color: var(--tp-mut);
  font-size: 13px;
  margin-top: var(--tp-gap-xl);
}
.tp-ft-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  flex-wrap: wrap;
}
.tp-ft a { color: var(--tp-ink-soft); }

/* ───────── Badges ───────── */
.tp-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  font-family: var(--tp-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  border-radius: 999px;
  background: var(--tp-surface-2);
  color: var(--tp-ink-soft);
  border: 1px solid var(--tp-line);
}
.tp-badge--accent { background: var(--tp-accent-l); color: var(--tp-accent-d); border-color: #e6d6b9; }
.tp-badge--solo      { color: var(--tp-ctx-solo);      border-color: #c4d4ea; background: #eef3fa; }
.tp-badge--couple    { color: var(--tp-ctx-couple);    border-color: #e8cee2; background: #f8edf6; }
.tp-badge--recruiter { color: var(--tp-ctx-recruiter); border-color: #c8d3cc; background: #ecf2ee; }

/* ───────── Toast (résultats sauvegardés, etc.) ───────── */
.tp-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  padding: 12px 18px;
  background: var(--tp-surface);
  border: 1px solid var(--tp-line);
  border-left: 3px solid var(--tp-accent);
  border-radius: var(--tp-radius);
  box-shadow: var(--tp-shadow-3);
  font-size: 14px;
  color: var(--tp-ink);
  max-width: 360px;
  animation: tp-toast-in .25s ease-out;
}
.tp-toast--ok    { border-left-color: var(--tp-success); }
.tp-toast--warn  { border-left-color: var(--tp-warn); }
.tp-toast--error { border-left-color: var(--tp-error); }
@keyframes tp-toast-in {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ───────── Score bars (pour profil et résultats) ───────── */
.tp-bar {
  position: relative;
  height: 8px;
  background: var(--tp-line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.tp-bar > span {
  display: block;
  height: 100%;
  background: var(--tp-accent);
  border-radius: 999px;
  transition: width .4s ease;
}
.tp-bar-row {
  display: grid;
  grid-template-columns: 200px 1fr 56px;
  gap: var(--tp-gap-s);
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}
.tp-bar-row .tp-bar-label { color: var(--tp-ink-soft); }
.tp-bar-row .tp-bar-value { font-family: var(--tp-font-mono); text-align: right; color: var(--tp-ink); }

/* ───────── Utility ───────── */
.tp-text-mut { color: var(--tp-mut); }
.tp-text-soft { color: var(--tp-ink-soft); }
.tp-text-center { text-align: center; }
.tp-mt-s { margin-top: var(--tp-gap-s); }
.tp-mt-m { margin-top: var(--tp-gap-m); }
.tp-mt-l { margin-top: var(--tp-gap-l); }
.tp-hidden { display: none !important; }
