/* ==========================================================================
   clement13.net — landing page : la conversation jouée.
   Même charte que le reste du site (tokens.css + site.css) ; ce fichier n'ajoute que
   la mise en page « application plein écran » et les composants de la conversation.
   ========================================================================== */

body.landing { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.landing .topbar { flex: none; }
.landing .shell { flex: 1 1 0; min-height: 0; display: flex; align-items: stretch; }
.landing .site-foot { flex: none; padding: 8px 18px; font-size: 12.5px; }
@media (min-width: 760px) {
  .landing .shell { align-items: stretch; }
  .landing .drawer { position: relative; top: 0; height: auto; }
}

.chat-shell { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
#chat { flex: 1; overflow-y: auto; padding: 18px 16px 24px; overscroll-behavior: contain; }
.thread { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.pending { display: none !important; }

/* ---- barre du haut : modèle fictif + bouton Passer / Rejouer ---- */
/* titre de la question en cours, rappelé dans l'en-tête quand elle a défilé hors de l'écran */
.top-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line); font-size: 13.5px; color: var(--txt); font-weight: 600; opacity: 0; transform: translateY(10px); visibility: hidden; transition: opacity .25s ease, transform .25s ease, visibility 0s .25s; }
.top-title.on { opacity: 1; transform: none; visibility: visible; transition: opacity .25s ease, transform .25s ease, visibility 0s; }
.top-title .icon { color: var(--acc-2); width: 18px; height: 18px; }
.top-title .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 60vw; }
.model-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.model-tag .icon { color: var(--acc-2); }

/* ---- panneau de droite : télécommande et note ---- */
.landing-panel { display: none; }
@media (min-width: 1080px) {
  .landing-panel { display: block; flex: none; width: 300px; overflow-y: auto; padding: 18px 16px; border-left: 1px solid var(--line); background: var(--bg-2); }
}
.landing-panel h2 { margin: 0 0 10px; padding: 0; border: 0; font-size: 1rem; }
.landing-panel .box { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 12px 14px; margin-bottom: 14px; }
.landing-panel .box p { margin: .5em 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.remote { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.remote .btn-icon:disabled { opacity: .4; cursor: default; }
.remote .btn-icon.on { border-color: var(--acc-2); }
.remote-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 10px 0 0; font-size: 14px; }
.remote-row select { background: var(--card); color: var(--txt); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; padding: 4px 8px; }
#skip .icon { width: 17px; height: 17px; }

/* ---- panneau de gauche : entrées propres à la landing ---- */
.drawer-extra { padding: 10px 8px 0; display: grid; gap: 2px; }
.drawer-extra .nav-link { width: 100%; background: none; border: 0; font: inherit; text-align: left; }
.drawer-extra .nav-link .icon { width: 18px; height: 18px; color: var(--muted); }
.drawer-label { font-size: 12px; color: var(--muted); padding: 12px 10px 2px; font-weight: 600; letter-spacing: .04em; }
.drawer-extra .current { background: color-mix(in srgb, var(--brand) 22%, transparent); cursor: default; }
.drawer-extra .current span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-user { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.drawer-user .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; font-size: 13px; font-weight: 700; }

/* ---- messages ---- */
.msg { animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.user { align-self: flex-end; max-width: 85%; }
.bubble { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 10px 18px; white-space: pre-wrap; word-wrap: break-word; }
.msg.ai { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; }
.msg.ai .logo { width: 28px; height: 28px; margin-top: 1px; }
.ai-name { font-weight: 650; font-size: 14.5px; line-height: 28px; }
.ai-body { min-width: 0; }
.ai-body > * + * { margin-top: 12px; }

/* ---- blocs de réflexion et appels d'outils ---- */
.think-head, .tool-head { display: flex; align-items: center; gap: 8px; max-width: 100%; text-align: left; color: var(--muted); font-size: 14px; padding: 2px 0; background: none; border: 0; cursor: pointer; font-family: inherit; }
.think-head:hover, .tool-head:hover { color: var(--txt); }
.chev { transition: transform .2s ease; width: 15px; height: 15px; }
.open > .think-head .chev, .open > .tool-head .chev { transform: rotate(90deg); }
.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.open > .collapse { grid-template-rows: 1fr; }
.collapse-inner { overflow: hidden; min-height: 0; }
.shimmer { background: linear-gradient(90deg, var(--muted) 20%, var(--txt) 50%, var(--muted) 80%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.think-body { margin: 6px 0 4px 4px; padding: 2px 0 2px 14px; border-left: 2px solid var(--line); color: var(--muted); font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.tool-ic { width: 20px; height: 20px; display: grid; place-items: center; }
.tool-ic .icon { width: 16px; height: 16px; }
.tool-head .tool-name { font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--txt); }
.tool-head .tool-sum { font-size: 13px; color: var(--muted); opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tool.done .tool-ic { color: var(--ok); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--txt); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tool-detail { margin: 6px 0 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.tool-detail .lbl { padding: 8px 12px 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tool-detail pre { margin: 0; padding: 4px 12px 10px; border: 0; border-radius: 0; background: none; font: 12.5px/1.55 ui-monospace, Consolas, monospace; color: var(--txt); }
.tool-detail pre + .lbl { border-top: 1px solid var(--line); margin-top: 2px; padding-top: 10px; }
.k { color: #7cb7ff; } .s { color: #ff9eab; } .n { color: #f5c542; }
:root[data-theme="light"] .k { color: #0b57c4; } :root[data-theme="light"] .s { color: #b3261e; } :root[data-theme="light"] .n { color: #8a6000; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .k { color: #0b57c4; } :root:not([data-theme="dark"]) .s { color: #b3261e; } :root:not([data-theme="dark"]) .n { color: #8a6000; }
}

/* ---- réponse ---- */
.answer h3 { font-size: 1.05rem; line-height: 1.4; margin: 20px 0 6px; font-weight: 650; }
.answer p { margin: 0 0 12px; }
.answer ul, .answer ol { margin: 0 0 12px; padding-left: 1.4em; }
.answer li { margin: 6px 0; padding-left: 4px; }
.answer table { font-size: 14px; line-height: 1.5; }
.answer th { font-size: 12.5px; color: var(--muted); }
.answer td:first-child { font-weight: 600; white-space: nowrap; }
.answer td:last-child { color: var(--muted); }
@media (max-width: 767px) { .answer td:first-child { white-space: normal; } .answer th, .answer td { padding: 8px 10px; } }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px; vertical-align: 1px; margin-left: 4px; white-space: nowrap; }
.chip.ok { color: var(--ok); background: var(--ok-bg); }
.chip.prob { color: var(--prob); background: var(--prob-bg); }
.chip.plau { color: var(--warn); background: var(--warn-bg); }
.chip.spec { color: var(--spec); background: var(--spec-bg); }
.sub { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.quote-card { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 4px 0 14px; }
.quote-card img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: none; filter: grayscale(.25); }
.quote-card blockquote { margin: 0 0 6px; padding: 0; border: 0; background: none; font-size: 16px; font-style: italic; line-height: 1.5; color: var(--txt); }
.quote-card .cite { font-size: 13px; color: var(--muted); }
.cursor-dot { display: inline-block; width: 9px; height: 9px; margin-left: 4px; border-radius: 50%; background: var(--txt); vertical-align: middle; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

.actions { display: flex; gap: 2px; margin-top: 6px; animation: rise .3s ease both; }
.btn-ghost { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; }
.btn-ghost:hover { background: var(--card); color: var(--txt); }
.btn-ghost .icon { width: 16px; height: 16px; }
.btn-ghost.on { color: var(--acc-2); }
.btn-ghost.flip .icon { transform: rotate(180deg); }

/* ---- zone de saisie (décor) ---- */
#dock { flex: none; padding: 0 16px 8px; }
.suggestions { max-width: 980px; margin: 0 auto 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.suggestions[hidden] { display: none; }
.suggestions .lbl { color: var(--muted); font-size: 13.5px; margin-right: 4px; }
.suggestions a { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--txt); text-decoration: none; font-size: 14px; }
.suggestions a:hover { border-color: var(--acc); color: var(--acc); }
.composer { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 8px 8px 8px 14px; min-height: 56px; }
.c-plus { color: var(--muted); display: grid; place-items: center; width: 32px; height: 32px; }
.c-text { flex: 1; min-width: 0; font-size: 16px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; position: relative; }
.c-text.empty::before { content: attr(data-ph); color: var(--muted); opacity: .7; position: absolute; left: 6px; right: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.caret { display: inline-block; width: 1.5px; height: 1.15em; margin-left: 1px; background: var(--txt); vertical-align: text-bottom; }
.caret.idle { animation: blink 1.06s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.send { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-2); color: #1a1500; border: 0; cursor: pointer; transition: background .2s, color .2s, transform .12s; }
.send:disabled { background: var(--line); color: var(--muted); cursor: default; }
.send.pressed { transform: scale(.88); }
.fine { text-align: center; font-size: 12px; color: var(--muted); margin: 8px 0 0; }

@media (max-width: 767px) {
  .model { display: none; }
  .landing .site-foot > span:first-child, .landing .site-foot .sep { display: none; }
  .landing .site-foot .copyright { flex-basis: auto; }
  #chat { padding: 10px 14px 20px; }
  .msg.ai { grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; }
  .msg.user { max-width: 92%; }
  .quote-card { flex-direction: column; text-align: center; }
  .tool-head .tool-sum { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.admin-box { padding: 0; }
.admin-figure { position: relative; margin: 0; }
.admin-figure > img { display: block; width: 100%; height: auto; border-radius: inherit; }
.admin-figure:hover .ph-zoom, .admin-figure:focus-within .ph-zoom { display: block; }

/* L'agrandissement du portrait s'affiche à gauche du panneau, par-dessus la conversation (le panneau défile : une bulle absolue serait rognée) */
.admin-figure .ph-zoom { position: fixed; top: 84px; right: 330px; left: auto; z-index: 70; width: min(420px, 42vw); }

.admin-figure .ph-zoom.rich { padding-right: 0; right: 330px; left: auto; }

/* Bandeau d'entrée : ce que propose le site, par profil */
.land-intro { flex: none; width: 100%; max-width: 980px; margin: 0 auto; padding: 12px 16px 2px; box-sizing: border-box; }
.li-claim { margin: 0 0 8px; font-size: 15px; line-height: 1.45; }
.li-claim strong { color: var(--acc-2); }
.li-skip { margin-left: 8px; font: inherit; font-size: 13px; padding: 2px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.li-skip:hover { border-color: var(--acc); color: var(--acc); }
.li-skip[hidden] { display: none; }
.li-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.li-card { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.li-card b { font-size: 14.5px; }
.li-card > span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.li-card .li-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.li-card .li-links a { font-size: 13px; }
@media (max-width: 760px) { .li-cards { grid-template-columns: 1fr; gap: 6px; } .li-card > span:not(.li-links) { display: none; } .li-card { padding: 8px 12px; } }

