:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.58;
  --ink: #172f35;
  --muted: #40585d;
  --brand: #154b56;
  --brand-deep: #0f3c46;
  --highlight: #e8b956;
  --paper: #faf8f3;
  --surface: #ffffff;
  --border: #cbd8d6;
  --focus: #b05f00;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: #125465; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .14em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
.container { width: min(100% - 2rem, 1080px); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; padding: .8rem; background: white; z-index: 20; }
.skip-link:focus { top: 1rem; }
.site-header { background: white; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; gap: 1rem; justify-content: space-between; align-items: center; min-height: 82px; }
.brand { display: flex; gap: .7rem; align-items: center; color: var(--brand-deep); font-size: 1.1rem; letter-spacing: -.015em; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--brand-deep); background: var(--highlight); font-weight: 850; font-size: 1.35rem; }
.header-link { font-weight: 700; }
.hero { background: linear-gradient(130deg, #154b56, #1e655f); color: #fff; }
.hero-inner { padding: clamp(3rem, 6vw, 5rem) 0 2.5rem; }
.eyebrow { margin: 0 0 .65rem; text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; font-weight: 850; }
.hero .eyebrow { color: #fce3ab; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.035em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.65rem); max-width: 830px; margin: 0 0 1.15rem; }
h1 span { color: #f4d68d; }
.intro { font-size: clamp(1.12rem, 2vw, 1.28rem); max-width: 775px; line-height: 1.6; margin: 0 0 2rem; }
.key-figures { display: flex; flex-wrap: wrap; gap: 1.8rem 2.5rem; border-top: 1px solid #ffffff5a; padding-top: 1.4rem; }
.key-figures p { display: grid; gap: 0; margin: 0; min-width: 145px; }
.key-figures strong { font-size: 1.7rem; line-height: 1.2; }
.key-figures span { font-size: .9rem; }
.question-section { padding-block: 3.5rem 4rem; }
.section-heading { max-width: 780px; margin-bottom: 1.5rem; }
.section-heading .eyebrow { color: #24645e; }
h2 { font-size: clamp(1.7rem, 3.7vw, 2.35rem); margin: .2rem 0 .75rem; }
.section-heading p { margin: 0; color: var(--muted); font-size: 1.04rem; }
#question-form { background: white; border: 1px solid var(--border); border-radius: 20px; padding: 1.4rem; box-shadow: 0 10px 30px #133c3c0d; }
#question-form label { display: block; font-weight: 800; margin-bottom: .65rem; }
.search-controls { display: flex; gap: .65rem; }
.search-controls input { flex: 1; min-width: 0; min-height: 62px; border: 2px solid #899c9f; border-radius: 12px; padding: .8rem 1rem; background: white; color: var(--ink); }
.search-controls input::placeholder { color: #526569; opacity: 1; }
.search-controls button { min-height: 62px; background: var(--brand); border: 2px solid var(--brand); color: white; border-radius: 12px; padding: .7rem 1.45rem; font-weight: 800; }
.search-controls button:hover { background: var(--brand-deep); }
.help-text { margin: .65rem 0 0; color: var(--muted); font-size: .85rem; }
.topics-title { font-size: 1.1rem; margin: 2.2rem 0 .8rem; }
.topics { display: flex; flex-wrap: wrap; gap: .65rem; }
.topics button { border: 1.5px solid #75a09d; color: #154b56; background: #eef7f4; border-radius: 999px; padding: .7rem 1rem; min-height: 50px; font-weight: 750; }
.topics button:hover, .topics button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.result { margin-top: 1.65rem; border: 2px solid #a7c6c1; border-radius: 20px; background: white; padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 12px 35px #153c3b0e; }
.result[hidden] { display: none; }
.result .result-label { color: #176052; font-size: .78rem; text-transform: uppercase; letter-spacing: .085em; font-weight: 850; margin: 0 0 .45rem; }
.result h3 { font-size: 1.5rem; margin: 0 0 1rem; }
.result p { margin: 0 0 1rem; }
.source-list { margin: 1.25rem 0 0; padding: 1rem 1.2rem; border-left: 5px solid var(--highlight); background: #f7f6ee; }
.source-list h4 { margin: 0 0 .5rem; font-size: .95rem; }
.source-list ul { margin: 0; padding-left: 1.2rem; }
.source-list li + li { margin-top: .4rem; }
.documents-section { background: #eaf2ef; padding-block: 3.2rem 4rem; }
.document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.document-list article { display: flex; align-items: flex-start; gap: 1rem; background: white; border: 1px solid #c5d7d1; padding: 1.25rem; border-radius: 17px; }
.document-icon { flex: 0 0 46px; display: grid; place-items: center; width: 46px; height: 50px; background: #e3efea; border-radius: 8px; color: #205449; font-weight: 850; font-size: .75rem; }
.document-icon.external { font-size: 1.4rem; }
.document-list h3 { font-size: 1.13rem; margin: 0 0 .45rem; }
.document-list p { font-size: .92rem; margin: 0 0 .5rem; color: var(--muted); }
.document-list a { font-weight: 750; }
.doc-status { display: inline-block; font-size: .8rem; color: #526367; }
.notice-section { padding-block: 3rem; max-width: 1080px; }
.notice-section h2 { font-size: 1.55rem; }
.notice-section p { max-width: 850px; }
.site-footer { background: var(--brand-deep); color: white; padding-block: 1.25rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin: 0; }
.site-footer a { color: white; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 700px) {
  :root { font-size: 18px; }
  .container { width: min(100% - 1.45rem, 1080px); }
  .hero-inner { padding-top: 2.65rem; }
  .search-controls { flex-direction: column; }
  .search-controls button { width: 100%; }
  .document-list { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.result .answer-text { white-space: pre-line; }

/* Public consultation deadline and guidance for the time-critical launch. */
.deadline { background: #fff6de; color: #283b40; border-left: 5px solid #e8b956; border-radius: 7px; max-width: 780px; padding: 1rem 1.2rem; margin: 0 0 1.8rem; }
.deadline a { color: #154b56; font-weight: 800; }
.participation-section { background: #fff; border-top: 3px solid #e8b956; padding: 2.8rem 0 3.3rem; }
.participation-section .eyebrow { color: #24645e; }
.participation-section h2 { margin-top: 0; }
.participation-section p { max-width: 850px; }
.participation-lead { font-size: 1.12rem; }
.steps { padding-left: 1.6rem; max-width: 870px; }
.steps li { padding-left: .35rem; margin: 0 0 .8rem; }
.participation-warning { border: 1px solid #d1bea3; background: #faf6e9; border-radius: 10px; padding: 1rem; }


/* Comprendre le parcours, rédiger un avis libre et expliquer la connexion MCP. */
.hero-actions { display:flex; gap:.8rem; flex-wrap:wrap; margin-bottom:2rem; }
.hero-actions a { display:inline-flex; align-items:center; min-height:48px; padding:.65rem 1.1rem; font-weight:800; border-radius:10px; text-decoration:none; }
.hero-action-primary { background:#fce3ab; color:#143a42; }
.hero-action-secondary { border:2px solid #fce3ab; color:#fff; }
.how-section { padding:3.2rem 0; background:#f4f3ee; }
.how-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.how-card { background:#fff; padding:1.4rem; border:1px solid var(--border); border-radius:16px; }
.how-number { display:grid; place-items:center; height:44px; width:44px; border-radius:14px; background:var(--highlight); color:var(--ink); font-weight:900; }
.how-card h3 { font-size:1.17rem; margin:1rem 0 .5rem; }
.how-card p { font-size:.93rem; margin:.25rem 0 1rem; color:var(--muted); }
.how-card a { font-weight:800; }
.draft-section { background:#f0f7f4; padding:3.2rem 0 3.7rem; }
.draft-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); gap:1.15rem; align-items:start; }
.draft-form, .draft-guide { background:#fff; padding:1.5rem; border:1px solid var(--border); border-radius:18px; }
.draft-field { margin-bottom:1rem; }
.draft-field label { display:block; font-size:.92rem; font-weight:800; margin-bottom:.35rem; }
.draft-field select,.draft-field textarea { display:block; width:100%; border:2px solid #91a5a5; background:#fff; border-radius:10px; color:var(--ink); min-height:48px; padding:.65rem .8rem; font:inherit; }
.draft-field textarea { min-height:100px; resize:vertical; }
.draft-field select:focus-visible,.draft-field textarea:focus-visible { outline:4px solid var(--focus); outline-offset:3px; }
.label-hint { font-weight:400; color:var(--muted); }
.draft-copy { min-height:52px; width:100%; border:0; border-radius:10px; color:#fff; background:var(--brand); font-weight:800; padding:.75rem 1rem; }
.draft-copy:hover { background:var(--brand-deep); }
.draft-copy:disabled { opacity:.65; cursor:wait; }
.draft-result { margin-top:1.35rem; padding:1.15rem; border:2px solid #68a08a; border-radius:14px; background:#f1faf5; }
.draft-result[hidden],.draft-toast[hidden] { display:none !important; }
.draft-result h3 { margin:0 0:.85rem; color:#145d47; font-size:1.2rem; }
.draft-result label { display:block; font-weight:800; margin-bottom:.5rem; }
.draft-result textarea { display:block; width:100%; min-height:340px; resize:vertical; color:var(--ink); background:#fff; font:inherit; line-height:1.55; padding:1rem; border:2px solid #91a5a5; border-radius:10px; }
.draft-result textarea:focus-visible { outline:4px solid var(--focus); outline-offset:3px; }
.draft-result .draft-copy { margin-top:.85rem; }
.draft-toast { margin:.85rem 0 0; padding:.8rem 1rem; border:2px solid #2b6c57; border-radius:10px; background:#ddf1e3; color:#124a38; font-weight:800; }

#draft-feedback { margin:.8rem 0 0; }
#draft-fallback { display:block; margin-top:1rem; width:100%; font:inherit; padding:.5rem; border:2px solid var(--brand); border-radius:8px; }
.draft-guide h3 { font-size:1.2rem; margin:0 0 .7rem; }
.draft-guide .steps { padding-left:1.45rem; }
.small-print { color:var(--muted); font-size:.88rem; }
.mcp-section { padding:2.6rem 0; background:#fff; }
.mcp-inner { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(0,.7fr); gap:1.4rem; align-items:center; }
.mcp-section .eyebrow { color:#24645e; }
.mcp-section p { max-width:720px; }
.mcp-preview { background:#f5f1df; border:1px solid #ddc998; border-radius:16px; padding:1.35rem; display:grid; gap:.65rem; }
.mcp-preview span:first-child { font-size:2rem; }
.mcp-preview span:last-child { color:var(--muted); font-size:.9rem; }
@media(max-width:780px) {
 .how-grid,.draft-layout,.mcp-inner { grid-template-columns:1fr; }
 .how-grid { gap:.7rem; }
 .how-section,.draft-section,.mcp-section { padding:2.5rem 0; }
 .hero-actions a { flex:1 1 100%; justify-content:center; }
 .draft-form,.draft-guide { padding:1.1rem; }
}

/* Public MCP setup: readable, copyable URL and two practical connector guides. */
.mcp-address { background:#f3f7f6; border:1px solid var(--border); border-radius:16px; padding:1.2rem; margin:1.2rem 0 1.4rem; }
.mcp-address label { display:block; margin-bottom:.55rem; font-weight:800; }
.mcp-address-controls { display:flex; gap:.65rem; }
.mcp-address-controls input { flex:1; min-width:0; padding:.7rem .8rem; min-height:54px; font-size:.86rem; background:white; color:var(--ink); border:2px solid #91a5a5; border-radius:10px; }
.mcp-address-controls input:focus-visible { outline:4px solid var(--focus); outline-offset:3px; }
.mcp-address-controls button { flex-shrink:0; min-height:54px; padding:.7rem 1rem; color:white; background:var(--brand); font-weight:800; border:0; border-radius:10px; }
.mcp-address-controls button:hover { background:var(--brand-deep); }
.mcp-connection-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.mcp-connection-grid article { background:#fff; padding:1.35rem; border:1px solid var(--border); border-radius:16px; }
.mcp-connection-grid h3 { margin:.2rem 0 .7rem; font-size:1.2rem; }
.mcp-connection-grid p { margin:.4rem 0 1rem; font-size:.92rem; }
.mcp-connection-grid ol { padding-left:1.35rem; margin:.8rem 0 1rem; font-size:.92rem; }
.mcp-connection-grid li { margin-bottom:.65rem; padding-left:.15rem; }
.mcp-doc-link a { font-weight:750; }
.mcp-example { background:#faf6e9; border-left:5px solid var(--highlight); margin:1.2rem 0 0; padding:1.1rem 1.4rem; }
.mcp-example h3 { font-size:1.15rem; margin:.1rem 0 .5rem; }
.mcp-example p { margin:.4rem 0 .7rem; }
@media(max-width:780px) {
 .mcp-connection-grid { grid-template-columns:1fr; }
 .mcp-address-controls { flex-direction:column; }
 .mcp-address-controls button { width:100%; }
 .mcp-address-controls input { font-size:.72rem; }
}

/* True multi-turn documentary conversation, accessible and readable on mobile. */
.chat-shell { border:1px solid var(--border); background:white; border-radius:19px; overflow:hidden; box-shadow:0 10px 30px #133c3c0d; }
.conversation { min-height:200px; max-height:630px; overflow-y:auto; padding:1.2rem; display:flex; flex-direction:column; gap:1.1rem; }
.chat-turn { max-width:min(95%,800px); padding:1rem 1.2rem; border-radius:17px; }
.chat-assistant { align-self:flex-start; background:#f0f5f2; border:1px solid #d2ded8; }
.chat-user { align-self:flex-end; background:#154b56; color:white; }
.chat-error { background:#fff4e6; color:var(--ink); border:1px solid #deb994; }
.chat-speaker { margin:0 0 .4rem; font-weight:850; font-size:.8rem; opacity:.82; }
.chat-content { white-space:pre-wrap; margin:0; overflow-wrap:anywhere; }
.chat-sources { border-top:1px solid #c4d7cf; margin-top:1rem; padding-top:.85rem; font-size:.87rem; }
.chat-source-heading { font-weight:700; margin:0 0 .4rem; }
.chat-sources ul { margin:0; padding-left:1.4rem; }
.chat-sources li { margin-bottom:.3rem; overflow-wrap:anywhere; }
.chat-shell #question-form { margin:0; border:none; border-top:1px solid var(--border); border-radius:0; box-shadow:none; padding:1.2rem; }
.chat-shell #question-form button:disabled { opacity:.6; cursor:wait; }
@media(max-width:700px) {
 .conversation { padding:.75rem; min-height:240px; max-height:65vh; }
 .chat-turn { padding:.85rem; max-width:100%; }
 .chat-shell #question-form { padding:.85rem; }
}

/* Chat answers are rendered as semantic, escaped DOM nodes. */
.chat-content {white-space:normal;overflow-wrap:anywhere;line-height:1.62;}
.chat-content p {margin:.12rem 0 .68rem;white-space:pre-wrap;}
.chat-content p:last-child {margin-bottom:0;}
.chat-content h3 {font-size:1.04rem;margin:1rem 0 .45rem;font-weight:800;}
.chat-content ul,.chat-content ol {margin:.45rem 0 .9rem;padding-left:1.4rem;}
.chat-content li {margin:.25rem 0;}
.chat-content strong {font-weight:800;}

/* Simple, always-visible section navigation, including on narrow screens. */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 12;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 5px 16px #133c3c10;
}
.section-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .3rem .55rem;
  padding: .5rem 0;
}
.section-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .35rem .7rem;
  border-radius: 9px;
  font-weight: 750;
  font-size: .88rem;
  text-decoration: none;
  white-space: nowrap;
}
.section-nav a:hover,
.section-nav a:focus-visible { background: #e8f2ee; text-decoration: underline; }
section[id] { scroll-margin-top: 9rem; }

/* The conversation is optional; topic selection remains the no-chat fallback. */
.draft-field .draft-conversation-option {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  cursor: pointer;
  font-weight: 750;
}
.draft-conversation-option input {
  accent-color: var(--brand);
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  margin: .1rem 0 0;
}
.draft-conversation-option input:disabled + span { color: var(--muted); }
@media (max-width: 700px) {
  .section-nav-links { gap: .15rem .25rem; padding: .4rem 0; }
  .section-nav a { font-size: .81rem; min-height: 38px; padding: .3rem .5rem; }
  section[id] { scroll-margin-top: 11rem; }
}
