:root {
  --ink: #18392f;
  --muted: #66766f;
  --paper: #f7f3ea;
  --paper-deep: #eee8dc;
  --white: #fffdf8;
  --coral: #e66f51;
  --coral-dark: #c9573d;
  --mint: #a9cfb8;
  --yellow: #e6bd55;
  --sky: #93bdc2;
  --line: rgba(24, 57, 47, 0.16);
  --shadow: 0 18px 50px rgba(43, 58, 48, 0.1);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 11%, rgba(230, 189, 85, 0.09), transparent 26rem),
    var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
button { color: inherit; }

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 20;
  padding: .75rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: .4rem;
}
.skip-link:focus { top: 1rem; }

.hidden { display: none !important; }
.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; }

.site-header {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 48px));
  height: 86px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.48rem;
}

.brand-mark { width: 34px; height: 34px; }
.brand-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.3; }

.header-note { margin: 0; color: var(--muted); font-size: .78rem; letter-spacing: .02em; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 1rem; }
.text-button {
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: .25rem 0;
  background: transparent;
  cursor: pointer;
  font-size: .82rem;
}
.notebook-button {
  display: inline-flex; align-items: center; gap: .45rem; padding: .42rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,248,.58); cursor: pointer; font-size: .72rem;
}
.notebook-button svg, .journey-notebook svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; }
.notebook-count { display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 .25rem; border-radius: 999px; color: white; background: var(--coral); font-size: .58rem; }

.hero {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 132px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  align-items: center;
  gap: 2rem;
  padding: 4.5rem 0 5.8rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--coral-dark);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow > span { width: 28px; height: 1px; background: currentColor; }

h1, h2, h3, p { text-wrap: pretty; }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.7rem, 6.1vw, 6rem);
  font-weight: 400;
  line-height: .97;
  letter-spacing: -.035em;
}

h1 em, h2 em { color: var(--coral); font-weight: 400; }

.hero-lead {
  max-width: 485px;
  margin: 1.8rem 0 2rem;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
}

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  min-height: 52px;
  padding: .85rem 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: .88rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-button {
  border: 1px solid var(--ink);
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(24, 57, 47, .15);
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 11px 24px rgba(24, 57, 47, .22); }
.primary-button svg, .secondary-button svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.secondary-button { border: 1px solid var(--line); background: transparent; }
.secondary-button:hover { background: var(--white); transform: translateY(-2px); }
.hero-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.notebook-link { padding: .5rem .2rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); font-size: .75rem; }
.notebook-link:hover { color: var(--ink); border-color: var(--ink); }

.reassurance {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1.15rem 0 0 .25rem;
  color: #78847e;
  font-size: .71rem;
}
.reassurance svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; }

.hero-visual { position: relative; aspect-ratio: 1.05; min-height: 540px; }
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route { fill: none; stroke: rgba(24, 57, 47, .37); stroke-width: 1.1; stroke-dasharray: 4 7; }
.route-one { animation: route 18s linear infinite; }
.route-two { animation: route 21s linear infinite reverse; }
.route-three { animation: route 20s linear infinite; }
.route-four { animation: route 17s linear infinite reverse; }
@keyframes route { to { stroke-dashoffset: -100; } }

.orbit {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 138px;
  height: 138px;
  border: 1px solid rgba(24, 57, 47, .25);
  border-radius: 50%;
  background: rgba(255, 253, 248, .62);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 35px rgba(36, 58, 48, .05);
}
.orbit::after { content: ''; position: absolute; inset: 7px; border: 1px solid rgba(24, 57, 47, .07); border-radius: inherit; }
.orbit strong { margin-top: .35rem; font-family: var(--serif); font-size: 1.05rem; font-weight: 400; }
.orbit small { margin-top: .15rem; color: var(--muted); font-size: .65rem; }
.orbit-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.orbit-icon svg { width: 24px; fill: none; stroke: var(--ink); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.orbit-a { top: 2%; left: 8%; transform: rotate(-3deg); }
.orbit-b { top: 12%; right: 0; transform: rotate(2deg); }
.orbit-c { bottom: 2%; left: 5%; transform: rotate(2deg); }
.orbit-d { right: -1%; bottom: 4%; transform: rotate(-2deg); }
.orbit-a .orbit-icon { background: rgba(230, 189, 85, .34); }
.orbit-b .orbit-icon { background: rgba(230, 111, 81, .25); }
.orbit-c .orbit-icon { background: rgba(169, 207, 184, .5); }
.orbit-d .orbit-icon { background: rgba(147, 189, 194, .35); }

.orbit-center {
  top: 50%; left: 50%;
  width: 94px; height: 94px;
  transform: translate(-50%, -50%);
  color: var(--coral-dark);
  background: var(--paper);
  border-color: var(--coral);
}
.orbit-center::after { inset: -9px; border-color: rgba(230, 111, 81, .2); }
.mini-label { text-align: center; font-family: var(--serif); font-size: .78rem; line-height: 1.15; }
.center-dot { position: absolute; bottom: 13px; width: 4px; height: 4px; border-radius: 50%; background: var(--coral); }

/* Exploration */
.explorer {
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 86px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 5rem;
  padding: 4.2rem 0 5rem;
}

.journey { padding-top: .8rem; }
.journey-heading { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); }
.journey-heading .eyebrow { margin-bottom: 1rem; }
.journey-heading > p:last-child { color: var(--muted); font-size: .68rem; }
.journey-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.journey-list li { position: relative; min-height: 62px; padding-left: 39px; color: #8a948f; font-size: .78rem; }
.journey-list li::before { content: ''; position: absolute; top: 7px; left: 11px; bottom: -7px; width: 1px; background: var(--line); }
.journey-list li:last-child::before { display: none; }
.journey-list .step-dot { position: absolute; z-index: 1; top: 1px; left: 3px; display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid #a9b1ad; border-radius: 50%; background: var(--paper); font-size: .56rem; }
.journey-list .active { color: var(--ink); font-weight: 600; }
.journey-list .active .step-dot { width: 21px; height: 21px; left: 1px; top: -1px; color: white; border-color: var(--coral); background: var(--coral); box-shadow: 0 0 0 5px rgba(230,111,81,.12); }
.journey-list .done { color: var(--ink); }
.journey-list .done .step-dot { color: white; border-color: var(--ink); background: var(--ink); }
.journey-choice { display: block; margin-top: .25rem; overflow: hidden; color: var(--coral-dark); font-size: .67rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }

.journey-thought { margin-top: 2.2rem; padding: 1.15rem; border: 1px solid rgba(230,111,81,.25); background: rgba(230,111,81,.055); }
.journey-thought svg { width: 22px; fill: none; stroke: var(--coral-dark); stroke-width: 1.3; }
.journey-thought p { margin: .65rem 0 0; color: var(--muted); font-family: var(--serif); font-size: .85rem; line-height: 1.45; }
.journey-thought em { color: var(--coral-dark); }
.journey-notebook { display: flex; align-items: center; gap: .5rem; width: 100%; margin-top: .75rem; padding: .75rem 1rem; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--ink); font-size: .7rem; }
.journey-notebook:hover { border-color: var(--coral); background: rgba(255,253,248,.55); }

.question-panel { position: relative; max-width: 780px; }
.progress-track { position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(24,57,47,.1); }
.progress-track span { display: block; height: 100%; width: 20%; background: var(--coral); transition: width .35s ease; }
.back-button { display: flex; align-items: center; gap: .35rem; margin-top: 1.1rem; padding: .4rem 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .74rem; }
.back-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.back-button:disabled { opacity: .25; cursor: default; }
.question-content { padding-top: 3.5rem; animation: appear .4s ease both; }
@keyframes appear { from { opacity: 0; transform: translateY(7px); } }
.question-kicker { margin: 0 0 .85rem; color: var(--coral-dark); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.question-content h2 { max-width: 710px; margin: 0; font-family: var(--serif); font-size: clamp(2.5rem, 4.4vw, 4.25rem); font-weight: 400; line-height: 1.06; letter-spacing: -.025em; }
.question-help { margin: 1rem 0 2.25rem; color: var(--muted); font-size: .88rem; }
.answer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.answer-card {
  position: relative;
  min-height: 125px;
  padding: 1.2rem 3.5rem 1.2rem 1.2rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,253,248,.62);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border .18s ease, background .18s ease, box-shadow .18s ease;
}
.answer-card:hover, .answer-card:focus-visible { z-index: 1; transform: translateY(-3px); border-color: var(--coral); background: var(--white); box-shadow: var(--shadow); outline: 0; }
.answer-card strong { display: block; margin-bottom: .38rem; font-family: var(--serif); font-size: 1.16rem; font-weight: 400; }
.answer-card small { display: block; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.answer-card .card-symbol { position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--paper-deep); color: var(--coral-dark); font-family: var(--serif); font-size: .82rem; }
.answer-card::after { content: ''; position: absolute; right: -20px; bottom: -35px; width: 82px; height: 82px; border: 1px solid rgba(230,111,81,.12); border-radius: 50%; }

/* Results */
.results { width: min(1100px, calc(100% - 48px)); margin: 0 auto; padding: 5.7rem 0 6rem; }
.results-intro { text-align: center; }
.results-intro .eyebrow { justify-content: center; }
.results-intro h2 { margin: 0; font-family: var(--serif); font-size: clamp(2.8rem, 5vw, 4.7rem); font-weight: 400; line-height: 1.04; letter-spacing: -.03em; }
.results-intro > p:last-child { max-width: 580px; margin: 1.3rem auto 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.profile-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 2.1rem auto 3.2rem; }
.profile-tag { padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,253,248,.55); font-size: .7rem; }
.profile-tag strong { color: var(--ink); font-weight: 500; }

.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
.result-card { position: relative; min-height: 440px; padding: 1.55rem; border: 1px solid var(--line); background: var(--white); box-shadow: 0 10px 35px rgba(44,58,49,.055); }
.result-card:first-child { transform: translateY(-12px); }
.result-rank { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.result-rank span:last-child { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--card-color); color: var(--ink); font-size: .78rem; }
.result-card h3 { min-height: 60px; margin: 1.25rem 0 .65rem; font-family: var(--serif); font-size: 1.65rem; font-weight: 400; line-height: 1.08; }
.result-card > p { min-height: 68px; margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.55; }
.result-card h4 { margin: 1.35rem 0 .7rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.study-list { display: flex; flex-wrap: wrap; gap: .42rem; margin: 0; padding: 0; list-style: none; }
.study-list li { padding: .4rem .6rem; border-radius: 3px; background: color-mix(in srgb, var(--card-color), white 64%); font-size: .66rem; }
.why { display: flex; gap: .55rem; margin-top: 1.25rem; padding: .75rem; background: #f5f1e8; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.why svg { flex: 0 0 auto; width: 16px; fill: none; stroke: var(--coral-dark); stroke-width: 1.5; }
.cross-section { margin-top: 4.5rem; padding: 2rem; border: 1px solid var(--line); background: var(--white); }
.cross-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.cross-heading .eyebrow { margin-bottom: .75rem; }
.cross-heading h3 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400; line-height: 1; }
.cross-heading h3 em { color: var(--coral); font-weight: 400; }
.cross-heading .secondary-button { min-height: 42px; padding: .6rem 1rem; font-size: .68rem; }
.cross-intro { max-width: 630px; margin: 1rem 0 1.6rem; color: var(--muted); font-size: .73rem; line-height: 1.55; }
.cross-scroll { overflow-x: auto; border: 1px solid var(--line); }
.cross-table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; }
.cross-table th, .cross-table td { height: 68px; padding: .65rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.cross-table tr:last-child th, .cross-table tr:last-child td { border-bottom: 0; }
.cross-table th:last-child, .cross-table td:last-child { border-right: 0; }
.cross-table thead th { height: 76px; color: var(--muted); background: #f5f1e8; font-size: .61rem; font-weight: 500; line-height: 1.3; }
.matrix-status { display: block; width: fit-content; margin: .4rem auto 0; padding: .18rem .35rem; border-radius: 999px; font-size: .48rem; font-weight: 500; white-space: nowrap; }
.matrix-status.explore { color: #855642; background: rgba(230,189,85,.24); }
.matrix-status.practice { color: #315c52; background: rgba(147,189,194,.25); }
.matrix-status.strength { color: white; background: var(--ink); }
.cross-table thead th:first-child { width: 185px; color: var(--coral-dark); text-align: left; text-transform: uppercase; letter-spacing: .08em; }
.cross-table tbody th { width: 185px; background: rgba(245,241,232,.48); text-align: left; font-family: var(--serif); font-size: .82rem; font-weight: 400; }
.cross-cell { position: relative; }
.affinity-dot { display: inline-block; border-radius: 50%; background: var(--coral); }
.cross-cell[data-affinity="0"] .affinity-dot { width: 4px; height: 4px; background: var(--line); opacity: 1; }
.cross-cell[data-affinity="1"] { background: rgba(230,111,81,.07); }
.cross-cell[data-affinity="1"] .affinity-dot { width: 8px; height: 8px; opacity: .45; }
.cross-cell[data-affinity="2"] { background: rgba(230,111,81,.14); }
.cross-cell[data-affinity="2"] .affinity-dot { width: 11px; height: 11px; opacity: .72; }
.cross-cell[data-affinity="3"] { background: rgba(230,111,81,.22); }
.cross-cell[data-affinity="3"] .affinity-dot { width: 14px; height: 14px; opacity: 1; }
.cross-empty { display: grid; place-items: center; min-height: 190px; padding: 2rem; border: 1px dashed rgba(24,57,47,.25); background: #f8f5ee; text-align: center; }
.cross-empty svg { width: 35px; fill: none; stroke: var(--coral); stroke-width: 1.1; }
.cross-empty h4 { margin: .7rem 0 .35rem; font-family: var(--serif); font-size: 1.2rem; font-weight: 400; }
.cross-empty p { max-width: 430px; margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.cross-legend { display: flex; justify-content: flex-end; align-items: center; gap: .65rem; margin-top: .7rem; color: var(--muted); font-size: .58rem; }
.cross-legend i { display: inline-block; border-radius: 50%; background: var(--coral); }
.cross-legend i:nth-of-type(1) { width: 6px; height: 6px; opacity: .35; }
.cross-legend i:nth-of-type(2) { width: 10px; height: 10px; opacity: .7; }
.cross-legend i:nth-of-type(3) { width: 14px; height: 14px; opacity: 1; }
.source-note { max-width: 680px; margin: 2rem auto 0; color: var(--muted); text-align: center; font-size: .7rem; line-height: 1.55; }
.source-note a { color: var(--ink); text-underline-offset: 3px; }

.next-step { margin-top: 4.5rem; padding: 2.2rem; display: grid; grid-template-columns: .85fr 1.15fr; gap: 4rem; background: var(--ink); color: white; }
.next-step .eyebrow { color: #ef9a82; }
.next-step h3 { max-width: 430px; margin: 0; font-family: var(--serif); font-size: 2rem; font-weight: 400; line-height: 1.15; }
.next-step ul { margin: 0; padding: 0; list-style: none; }
.next-step li { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.82); font-size: .78rem; }
.next-step li:last-child { border-bottom: 0; }
.next-step li span { color: #ef9a82; font-family: var(--serif); }
.results-actions { display: flex; justify-content: center; gap: .75rem; margin-top: 2.3rem; }

footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 1.3rem 0 2rem; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .67rem; }
footer span { margin: 0 .3rem; color: var(--coral); }

/* Carnet de compétences */
.notebook-shell { position: fixed; z-index: 50; inset: 0; }
.notebook-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(19,41,34,.52); cursor: default; animation: fade-in .2s ease both; }
.notebook { position: absolute; top: 0; right: 0; width: min(680px, 94vw); height: 100%; padding: 2rem 2.2rem; overflow-y: auto; background: var(--paper); box-shadow: -22px 0 60px rgba(15,36,29,.2); animation: slide-in .3s ease both; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(32px); opacity: .5; } }
.notebook-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.notebook-header .eyebrow { margin-bottom: .65rem; }
.notebook-header h2 { margin: 0; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400; line-height: 1.05; }
.close-button { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; }
.close-button:hover { border-color: var(--ink); }
.close-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.35; }
.notebook-intro { max-width: 530px; margin: 1.3rem 0 1.6rem; color: var(--muted); font-size: .78rem; line-height: 1.6; }
.discipline-area { display: grid; grid-template-columns: 36px 1fr; margin: 0 0 2rem; padding: 1.2rem; border: 1px solid var(--line); background: rgba(255,253,248,.52); }
.section-number { display: grid; place-items: center; align-self: start; width: 25px; height: 25px; border-radius: 50%; color: white; background: var(--coral); font-family: var(--serif); font-size: .65rem; }
.discipline-area h3, .competency-heading h3 { margin: 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.discipline-area p, .competency-heading p { margin: .2rem 0 0; color: var(--muted); font-size: .62rem; }
.discipline-list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.discipline-chip { padding: .48rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer; color: var(--muted); font-size: .64rem; transition: .16s ease; }
.discipline-chip:hover { border-color: var(--coral); color: var(--ink); }
.discipline-chip.selected { border-color: var(--ink); color: white; background: var(--ink); box-shadow: 0 4px 10px rgba(24,57,47,.12); }
.competency-area { margin-top: 1rem; }
.competency-heading { display: grid; grid-template-columns: 36px 1fr; margin-bottom: 1rem; }
.notebook-legend { display: grid; grid-template-columns: 1fr repeat(3, 82px); gap: .35rem; margin: 0 0 .55rem; padding-left: 1rem; color: var(--muted); font-size: .56rem; text-align: center; }
.notebook-legend span:first-child { grid-column: 2; }
.skill-list { border-top: 1px solid var(--line); }
.skill-row { display: grid; grid-template-columns: 1fr repeat(3, 82px); align-items: center; gap: .35rem; min-height: 66px; padding: .65rem 0 .65rem 1rem; border-bottom: 1px solid var(--line); }
.skill-name strong { display: block; font-family: var(--serif); font-size: .95rem; font-weight: 400; }
.skill-name small { display: block; max-width: 250px; margin-top: .18rem; color: var(--muted); font-size: .59rem; line-height: 1.35; }
.level-button { width: 29px; height: 29px; margin: 0 auto; border: 1px solid #aab3ae; border-radius: 50%; background: transparent; cursor: pointer; }
.level-button:hover { border-color: var(--coral); }
.level-button.selected { position: relative; border-color: var(--coral); background: var(--coral); box-shadow: inset 0 0 0 5px var(--paper); }
.custom-skill-area { margin-top: 1.8rem; padding: 1.2rem; border: 1px solid var(--line); background: rgba(255,253,248,.5); }
.custom-skill-area h3 { margin: 0 0 .7rem; font-family: var(--serif); font-size: 1.05rem; font-weight: 400; }
.custom-skill-area form { display: flex; }
.custom-skill-area input { flex: 1; min-width: 0; padding: .75rem; border: 1px solid var(--line); border-right: 0; background: var(--white); color: var(--ink); font: inherit; font-size: .7rem; }
.custom-skill-area select { max-width: 125px; padding: .65rem .5rem; border: 1px solid var(--line); border-right: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: .61rem; }
.custom-skill-area form button { padding: .65rem 1rem; border: 1px solid var(--ink); color: white; background: var(--ink); cursor: pointer; font-size: .68rem; }
.custom-skills { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.custom-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .55rem; border-radius: 999px; background: var(--paper-deep); font-size: .62rem; }
.custom-chip small { padding-left: .35rem; border-left: 1px solid var(--line); color: var(--muted); font-size: .52rem; }
.custom-chip button { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; background: rgba(24,57,47,.12); cursor: pointer; font-size: .7rem; }
.evidence-label { display: block; margin-top: 1.7rem; }
.evidence-label strong { display: block; font-family: var(--serif); font-size: 1.05rem; font-weight: 400; }
.evidence-label span { color: var(--muted); font-size: .62rem; }
#evidenceNotes { width: 100%; margin-top: .65rem; padding: .85rem; resize: vertical; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-size: .72rem; line-height: 1.5; }
.notebook-footer { position: sticky; bottom: -2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.8rem -2.2rem -2rem; padding: 1rem 2.2rem; border-top: 1px solid var(--line); background: rgba(247,243,234,.96); backdrop-filter: blur(8px); }
.notebook-footer p { display: flex; align-items: center; gap: .4rem; margin: 0; color: var(--muted); font-size: .58rem; }
.notebook-footer p svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.notebook-footer .primary-button { min-height: 42px; padding: .6rem 1rem; font-size: .72rem; }
body.notebook-open { overflow: hidden; }

/* Carnet en fiches : une fiche = une compétence, rattachée aux niveaux et domaines du G.R.P. */
.entries-area { margin: 0 0 1.6rem; }
.entries-area h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.entries-area h3 span { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .35rem; border-radius: 999px; background: var(--ink); color: white; font-family: var(--sans); font-size: .6rem; }
.entry-list { display: grid; gap: .45rem; }
.entry-empty { margin: 0; padding: .9rem 1rem; border: 1px dashed var(--line); color: var(--muted); font-size: .66rem; }
.entry-card { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; padding: .8rem 1rem; border: 1px solid var(--line); border-left: 3px solid var(--coral); background: var(--white); }
.entry-card.editing { border-color: var(--ink); border-left-color: var(--ink); }
.entry-card strong { font-family: var(--serif); font-size: .95rem; font-weight: 400; }
.entry-card small { grid-column: 1; color: var(--muted); font-size: .58rem; }
.entry-card p { grid-column: 1; margin: .3rem 0 0; color: var(--ink); font-size: .62rem; line-height: 1.45; }
.entry-actions { grid-column: 2; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: .3rem; align-self: center; }
.entry-actions button { padding: .3rem .55rem; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--ink); font-size: .58rem; }
.entry-actions button:hover { border-color: var(--coral); }
#competenceForm { padding-top: 1.3rem; border-top: 1px solid var(--line); }
.form-mode { margin: 0 0 .9rem; color: var(--coral-dark); font-size: .6rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.skill-row { grid-template-columns: 1fr auto; width: 100%; min-height: 58px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.skill-row:hover { background: rgba(255,253,248,.7); }
.skill-row.selected { background: var(--white); box-shadow: inset 3px 0 0 var(--coral); }
.skill-link { padding: .2rem .45rem; border-radius: 999px; background: rgba(230,111,81,.12); color: var(--coral-dark); font-size: .54rem; white-space: nowrap; }
.skill-separator { margin: .9rem 0 .2rem 1rem; color: var(--muted); font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; }
.custom-skill-label { display: block; margin: 1rem 0 .4rem; color: var(--muted); font-size: .62rem; }
#customSkillInput { width: 100%; padding: .7rem .75rem; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-size: .7rem; }
.level-area, .domain-area { margin-top: 1.6rem; }
.level-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.grp-level { display: grid; grid-template-columns: 24px 1fr; gap: .1rem .55rem; padding: .7rem .8rem; border: 1px solid var(--line); background: rgba(255,253,248,.55); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.grp-level span { grid-row: span 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--paper-deep); font-size: .62rem; font-weight: 700; }
.grp-level strong { font-family: var(--serif); font-size: .9rem; font-weight: 400; }
.grp-level small { color: var(--muted); font-size: .56rem; line-height: 1.35; }
.grp-level:hover { border-color: var(--coral); }
.grp-level.selected { border-color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1px var(--ink); }
.grp-level.selected span { background: var(--coral); color: white; }
#grpDomain { width: 100%; padding: .7rem .6rem; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-size: .7rem; }
.evidence-label { display: grid; grid-template-columns: 36px 1fr; }
.evidence-label .section-number { grid-row: span 2; }
.footer-actions { display: flex; align-items: center; gap: .6rem; }
.form-status[data-kind="erreur"] { color: var(--coral-dark); font-weight: 600; }
.form-status[data-kind="ok"] { color: var(--ink); font-weight: 600; }
.back-grp { justify-self: start; padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: .62rem; text-decoration: none; white-space: nowrap; }
.back-grp:hover { border-color: var(--coral); }
.lien-grp { color: var(--ink); }
@media (max-width: 680px) { .level-list { grid-template-columns: 1fr; } .notebook { padding: 1.4rem 1.1rem; } .notebook-footer { margin: 1.8rem -1.1rem -1.4rem; padding: 1rem 1.1rem; flex-wrap: wrap; } }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-note { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 3.6rem; }
  .hero-copy { max-width: 680px; }
  .hero-visual { min-height: 500px; max-width: 620px; width: 100%; margin: 0 auto; }
  .explorer { grid-template-columns: 220px 1fr; gap: 2.5rem; }
  .result-grid { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
  .result-card, .result-card:first-child { min-height: auto; transform: none; }
  .result-card h3, .result-card > p { min-height: 0; }
  .next-step { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 680px) {
  .site-header, .hero, .explorer, .results, footer { width: min(100% - 30px, 1180px); }
  .site-header { height: 72px; }
  .brand { font-size: 1.28rem; }
  .brand-mark { width: 30px; height: 30px; }
  .header-actions .text-button { display: none !important; }
  .notebook-button { padding: .4rem .55rem; }
  .hero { min-height: auto; padding: 3.6rem 0; }
  h1 { font-size: clamp(3.1rem, 15vw, 4.4rem); }
  .hero-lead { font-size: .92rem; }
  .hero-visual { min-height: 400px; }
  .orbit { width: 105px; height: 105px; }
  .orbit-center { width: 75px; height: 75px; }
  .orbit strong { font-size: .88rem; }
  .orbit-icon { width: 32px; height: 32px; }
  .orbit-icon svg { width: 19px; }
  .explorer { display: block; padding-top: 1.8rem; }
  .journey { padding: 0; }
  .journey-list, .journey-thought { display: none; }
  .journey-notebook { display: none; }
  .journey-heading { margin-bottom: 1rem; }
  .question-content { padding-top: 2.5rem; }
  .question-content h2 { font-size: 2.55rem; }
  .answer-grid { grid-template-columns: 1fr; }
  .answer-card { min-height: 108px; }
  .results { padding-top: 4rem; }
  .results-intro h2 { font-size: 2.75rem; }
  .next-step { padding: 1.5rem; }
  .results-actions { flex-direction: column; }
  .cross-section { margin-top: 3rem; padding: 1.1rem; }
  .cross-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .notebook { width: 100%; max-width: none; padding: 1.25rem 1rem; }
  .notebook-legend { grid-template-columns: 1fr repeat(3, 42px); padding-left: 0; }
  .skill-row { grid-template-columns: 1fr repeat(3, 42px); padding-left: 0; }
  .skill-name small { display: none; }
  .notebook-footer { bottom: -1.25rem; margin: 1.4rem -1rem -1.25rem; padding: .8rem 1rem; }
  .notebook-footer p { display: none; }
  .custom-skill-area form { flex-wrap: wrap; }
  .custom-skill-area input { flex-basis: 100%; border-right: 1px solid var(--line); border-bottom: 0; }
  .custom-skill-area select { flex: 1; max-width: none; }
}

@media print {
  body { background: white; }
  .site-header, .hero, .explorer, .results-actions, footer { display: none !important; }
  .results { display: block !important; width: 100%; padding: 0; }
  .result-card { break-inside: avoid; box-shadow: none; }
  .next-step { color: var(--ink); background: #eee; }
  .next-step .eyebrow, .next-step li span, .next-step li { color: var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Surcharge locale de responsivité — ajoutée par sections/documents.py. */
html{color-scheme:light dark}

/* Palette sombre unifiée : mêmes bleu nuit et ardoise que le reste du site.
   Le corail, le jaune, la menthe et le ciel gardent leur rôle de repères. */
@media (prefers-color-scheme:dark){
  :root{
    --ink:#e2e8f0;
    --muted:#94a3b8;
    --paper:#020617;
    --paper-deep:#0b1222;
    --white:#0f172a;
    --coral:#f18468;
    --coral-dark:#f2a18b;
    --line:rgba(148,163,184,.2);
    --shadow:0 18px 50px rgba(0,0,0,.3)
  }
  body{background:radial-gradient(circle at 16% 11%,rgba(59,130,246,.10),transparent 26rem),var(--paper)}
  .route{stroke:rgba(148,163,184,.32)}
  .orbit,.answer-card,.profile-tag,.notebook-button,
  .discipline-area,.custom-skill-area,.grp-level{background:rgba(15,23,42,.72)}
  .orbit{border-color:rgba(148,163,184,.26);box-shadow:0 8px 35px rgba(0,0,0,.16)}
  .orbit::after{border-color:rgba(148,163,184,.10)}
  .orbit-center{background:var(--paper);border-color:var(--coral)}
  .journey-list li{color:#7f8da0}
  .journey-list .step-dot{border-color:#64748b;background:var(--paper)}
  .journey-notebook:hover,.skill-row:hover{background:rgba(30,41,59,.72)}
  .progress-track{background:rgba(148,163,184,.16)}
  .answer-card:hover,.answer-card:focus-visible{background:#172033}
  .result-card,.cross-section,.entry-card,.skill-row.selected{background:var(--white)}
  .study-list li{background:color-mix(in srgb,var(--card-color) 28%,#0f172a)}
  .why,.cross-table thead th{background:#111a2d}
  .cross-table tbody th{background:rgba(17,26,45,.72)}
  .cross-empty{border-color:rgba(148,163,184,.26);background:#0b1222}
  .matrix-status.explore{color:#f1cf83}
  .matrix-status.practice{color:#9fd7dc}
  .notebook-backdrop{background:rgba(2,6,23,.68)}
  .notebook{box-shadow:-22px 0 60px rgba(0,0,0,.35)}
  .notebook-footer{background:rgba(2,6,23,.94)}
  .custom-skill-area input,.custom-skill-area select,#evidenceNotes,
  #customSkillInput,#grpDomain{color-scheme:dark}
  .skip-link,.primary-button,.journey-list .done .step-dot,
  .matrix-status.strength,.discipline-chip.selected,.custom-skill-area form button,
  .entries-area h3 span{border-color:#475569;background:#334155;color:#fff}
  .next-step{background:#0b1222;color:#f8fafc}
  .next-step li{color:#cbd5e1;border-bottom-color:rgba(148,163,184,.2)}
  .custom-chip button{background:rgba(148,163,184,.18)}
  .grp-level.selected{border-color:#64748b;background:#172033;box-shadow:inset 0 0 0 1px #64748b}
}

html{overflow-x:clip}
body{min-width:0;min-height:100svh;min-height:100dvh;overflow-wrap:break-word}
img,svg,video,canvas{max-width:100%;height:auto}
button,a,input,select,textarea{max-width:100%}
.notebook-shell{height:100svh;height:100dvh}
.notebook{height:100svh;height:100dvh;overscroll-behavior:contain}
.cross-scroll{max-width:100%;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}

@media (max-width:980px){
  .site-header,.hero,.explorer,.results,footer{width:min(100% - 32px,1180px)}
  .site-header{height:72px;grid-template-columns:minmax(0,1fr) auto}
  .header-note{display:none}
  .hero{grid-template-columns:minmax(0,1fr);min-height:auto;padding-top:3.4rem}
  .hero-copy{max-width:680px}.hero-visual{width:100%;max-width:620px;min-height:460px;margin:0 auto}
  .explorer{grid-template-columns:210px minmax(0,1fr);gap:2rem}
  .result-grid{grid-template-columns:minmax(0,1fr);max-width:650px;margin:0 auto}
  .result-card,.result-card:first-child{min-height:0;transform:none}
  .result-card h3,.result-card>p{min-height:0}
  .next-step{grid-template-columns:minmax(0,1fr);gap:1.4rem}
}

@media (max-width:700px){
  .site-header,.hero,.explorer,.results,footer{width:min(100% - 24px,1180px)}
  .site-header{height:64px}.brand{font-size:1.15rem}.brand-mark{width:28px;height:28px}
  .header-actions{gap:.4rem}.header-actions .text-button{display:none!important}.notebook-button{padding:.45rem .55rem}
  .hero{padding:2.8rem 0}.hero h1{font-size:clamp(2.8rem,15vw,4.25rem)}.hero-lead{font-size:.9rem}
  .hero-visual{min-height:360px}.orbit{width:100px;height:100px}.orbit-center{width:72px;height:72px}
  .orbit-icon{width:32px;height:32px}.orbit-icon svg{width:19px}
  .explorer{display:block;padding-top:1.7rem}.journey{padding:0}.journey-list,.journey-thought,.journey-notebook{display:none}
  .question-content{padding-top:2rem}.question-content h2{font-size:clamp(2rem,11vw,2.7rem)}
  .answer-grid{grid-template-columns:minmax(0,1fr)}.answer-card{min-height:104px}
  .results{padding-block:3.5rem}.results-intro h2{font-size:clamp(2.2rem,12vw,3rem)}
  .cross-section{margin-top:2.5rem;padding:1rem}.cross-heading{align-items:flex-start;flex-direction:column;gap:.8rem}
  .results-actions{flex-direction:column;align-items:stretch}.results-actions>*{width:100%;justify-content:center}
  .next-step{padding:1.25rem}
  .notebook{width:100%;max-width:none;padding:1.1rem .9rem;padding-bottom:max(1.1rem,env(safe-area-inset-bottom))}
  .notebook-header{gap:1rem}.notebook-header h2{font-size:clamp(1.8rem,10vw,2.5rem)}
  .discipline-area,.custom-skill-area{padding:.9rem}
  .notebook-legend{grid-template-columns:minmax(0,1fr) repeat(3,40px);padding-left:0}
  .skill-row{grid-template-columns:minmax(0,1fr) auto;padding-left:0}
  .skill-name small{display:none}.level-list{grid-template-columns:minmax(0,1fr)}
  .custom-skill-area form{flex-wrap:wrap}.custom-skill-area input{flex-basis:100%;border-right:1px solid var(--line);border-bottom:0}
  .custom-skill-area select{flex:1;max-width:none}
  .notebook-footer{bottom:-1.1rem;margin:1.4rem -.9rem -1.1rem;padding:.8rem .9rem;flex-wrap:wrap}
  .notebook-footer p{display:none}.entry-card{grid-template-columns:minmax(0,1fr)}
  .entry-actions{grid-column:1;grid-row:auto;flex-direction:row;flex-wrap:wrap}
}

@media (max-width:390px){
  .brand span:last-child{display:none}.back-grp{padding:.3rem .45rem}
  .hero-visual{min-height:320px}.orbit{width:88px;height:88px}.orbit-center{width:64px;height:64px}
  .mini-label{font-size:.68rem}.answer-card{padding:1rem}.result-card{padding:1.15rem}
  .notebook-legend{grid-template-columns:minmax(0,1fr) repeat(3,34px);font-size:.5rem}
}

@media (max-height:600px) and (orientation:landscape){
  .site-header{height:56px}
  .hero{padding:1.5rem 0}
  .hero h1{font-size:clamp(2.7rem,7vw,4rem)}.hero-lead{margin:1rem 0;font-size:.8rem}
  .hero-actions{gap:.5rem}.primary-button,.secondary-button{min-height:42px;padding:.65rem 1rem}
  .reassurance{margin-top:1rem}.hero-visual{min-height:330px}
  .explorer{min-height:calc(100dvh - 56px);padding-block:1.5rem}
  .question-content{padding-top:1.4rem}.question-content h2{font-size:clamp(2rem,5vw,3rem)}
  .answer-card{min-height:92px;padding:1rem}.results{padding-block:2.5rem}
  .notebook{padding-top:1rem}.notebook-header{padding-bottom:.8rem}.notebook-intro{margin-block:.7rem 1rem}
}

@media (min-width:701px) and (max-height:600px) and (orientation:landscape){
  .hero{grid-template-columns:minmax(280px,.9fr) minmax(360px,1.1fr);gap:2rem}
}

@media (min-width:1700px){
  .site-header,.hero,.explorer,footer{width:min(1380px,calc(100% - 80px))}
  .results{width:min(1280px,calc(100% - 80px))}
}

/* Contrat tactile du document autonome : mêmes cibles de 44 px que le site. */
@media (pointer:coarse){
  :where(a,button,summary,input,select,textarea){touch-action:manipulation;-webkit-tap-highlight-color:rgba(147,189,194,.2)}
  .text-button,.notebook-button,.primary-button,.secondary-button,
  .answer-card,.journey-notebook,.close-button,.discipline-chip,
  .level-button,.custom-skill-area form button,.entry-actions button,
  .skill-row,.grp-level,.back-grp{min-height:44px}
  .close-button,.level-button{min-width:44px}
  :where(input,select,textarea){font-size:16px!important}
  .cross-scroll{touch-action:pan-x pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
  .notebook{touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
}

/* Logo UnI commun : même image que l’en-tête du site. */
.brand-mark .logo-uni{display:block;width:34px;height:34px}
