/* Styles propres à chaque module. */

/* ============ Accueil ============ */
.home-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 40px;
  min-height: 330px;
  margin-bottom: 36px;
}
.home-core-wrap {
  position: relative;
  aspect-ratio: 1.25;
  max-height: 340px;
}
.home-core {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.home-date {
  font-size: var(--t-13);
  font-weight: 560;
  color: var(--fg-3);
  margin-bottom: 14px;
  font-stretch: 110%;
}
.home-greet {
  --stretch: 124%;
  font-size: clamp(40px, 4.6vw, 66px);
  font-stretch: 124%;
}
.home-status {
  margin-top: 16px;
  font-size: var(--t-18);
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 52ch;
}
.home-inst {
  margin-bottom: 16px;
}
.inst {
  display: flex;
  flex-direction: column;
  min-height: 178px;
}
.inst-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--t-12);
  color: var(--fg-3);
}
.inst-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--fg-2);
}
.inst-value {
  margin-top: 14px;
  font-size: var(--t-36);
  font-weight: 640;
  font-stretch: 114%;
  letter-spacing: -0.025em;
  line-height: 1;
}
.inst-sub {
  font-variant-numeric: tabular-nums;
}
.inst-trace {
  width: 100%;
  height: 64px;
  margin-top: auto;
}
.inst-disks {
  margin-top: 14px;
  font-size: var(--t-12);
  color: var(--fg-3);
  line-height: 1.5;
}
.home-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.home-sec-body .dial-wrap {
  flex: none;
}
.home-tools-title {
  margin-bottom: 16px;
}
.li.done .strike {
  position: relative;
  color: var(--fg-3);
}
.li .strike {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.li.done .strike::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  animation: zk-strike 0.4s var(--ease-out) both;
}
@media (max-width: 980px) {
  .home-hero,
  .home-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-core-wrap {
    max-height: 240px;
  }
}

/* ============ Cadran ============ */
.dial-wrap {
  position: relative;
  display: grid;
  place-items: center;
}
.dial {
  position: absolute;
  inset: 0;
}
.dial .tick {
  stroke: var(--line-2);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.dial .tick.on {
  stroke: var(--fg);
  animation: zk-tick-in 0.5s var(--ease-out) both;
  animation-delay: calc(var(--i) * 14ms + 200ms);
  transform-origin: 100px 100px;
}
.dial-center {
  position: relative;
  text-align: center;
}
.dial-value {
  font-size: 2.3em;
  font-weight: 680;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  line-height: 1;
}
.dial-label {
  margin-top: 6px;
  font-size: var(--t-12);
  font-weight: 600;
  color: var(--fg-2);
}
.dial-sub {
  font-size: var(--t-11);
  color: var(--fg-3);
  margin-top: 2px;
}

/* ============ Jarvis ============ */
.jarvis {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}
.jv-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 12px;
  border-right: 1px solid var(--line);
  min-height: 0;
}
.jv-new {
  justify-content: flex-start;
  margin-bottom: 10px;
}
.jv-side-label {
  padding: 8px 10px 4px;
}
.jv-convs {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.jv-conv {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 6px 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.jv-conv:hover {
  background: var(--haze);
}
.jv-conv.on {
  background: var(--haze-2);
}
.jv-conv-main {
  flex: 1;
  min-width: 0;
}
.jv-conv-title {
  font-size: var(--t-13);
  font-weight: 540;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jv-conv .btn {
  opacity: 0;
}
.jv-conv:hover .btn {
  opacity: 1;
}
.jv-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.jv-main.drop::after {
  content: "Déposez pour joindre";
  position: absolute;
  inset: 16px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--fg);
  background: var(--scrim);
  font-size: var(--t-21);
  font-weight: 640;
  font-stretch: 114%;
  z-index: 10;
  animation: zk-fade 0.2s both;
}
.jv-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  height: 250px;
  padding-top: 18px;
  transition: height 0.7s var(--ease-out), padding 0.7s var(--ease-out);
}
.jv-stage.compact {
  height: 84px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line);
}
.jv-core {
  width: 300px;
  height: 200px;
  transition: width 0.7s var(--ease-out), height 0.7s var(--ease-out);
}
.jv-stage.compact .jv-core {
  width: 96px;
  height: 64px;
}
.jv-state {
  position: absolute;
  bottom: 10px;
  font-size: var(--t-12);
  font-weight: 600;
  font-stretch: 112%;
  color: var(--fg-2);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.jv-state.on {
  opacity: 1;
  transform: none;
}
.jv-state.on::after {
  content: "…";
  animation: zk-pulse 1.2s infinite;
}
.jv-stage.compact .jv-state {
  bottom: auto;
  top: 30px;
  left: calc(50% + 60px);
}
.chat-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.chat-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 18px 28px 28px;
}
.jv-hero {
  text-align: center;
  padding: 8px 0 20px;
}
.jv-greet {
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 660;
  font-stretch: 122%;
  letter-spacing: -0.028em;
  line-height: 1.05;
  animation: zk-widen 1s var(--ease-out) both;
  --stretch: 122%;
}
.jv-intro {
  margin: 12px auto 0;
  max-width: 54ch;
  color: var(--fg-2);
  font-size: var(--t-16);
}
.jv-sugg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 30px;
  text-align: left;
}
.jv-sugg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: var(--t-13);
  color: var(--fg-2);
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.2s var(--spring);
  animation: zk-rise 0.6s var(--ease-out) both;
  animation-delay: calc(var(--i) * 45ms + 250ms);
}
.jv-sugg-item:hover {
  border-color: var(--line-3);
  color: var(--fg);
  background: var(--haze);
}
.jv-sugg-item:active {
  transform: scale(0.98);
}
.jv-composer {
  flex: none;
  max-width: 868px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 18px;
}
.jv-att {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.jv-att .chip button {
  display: grid;
  place-items: center;
  margin-right: -4px;
  opacity: 0.6;
}
.jv-att .chip button:hover {
  opacity: 1;
}
.jv-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.jv-input-row:focus-within {
  border-color: var(--fg);
  box-shadow: 0 0 0 4px var(--haze-2);
}
.jv-input {
  flex: 1;
  min-height: 38px;
  max-height: 220px;
  padding: 9px 6px;
  border: 0;
  background: none;
  resize: none;
  font-size: var(--t-14);
  line-height: 1.45;
}
.jv-input::placeholder {
  color: var(--fg-4);
}
.jv-input:focus-visible {
  outline: none;
}
.jv-sugg-item span {
  text-align: left;
}
.jv-mic.on {
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-color: var(--inv-bg);
  box-shadow: 0 0 0 0 var(--glow);
  animation: jv-ring 1.4s var(--ease-out) infinite;
}
@keyframes jv-ring {
  0% { box-shadow: 0 0 0 0 var(--haze-3); }
  100% { box-shadow: 0 0 0 14px rgba(127, 127, 127, 0); }
}
.jv-options {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  padding: 0 6px;
  flex-wrap: wrap;
}
.jv-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--t-12);
  font-weight: 560;
  color: var(--fg-2);
  cursor: pointer;
}
@media (max-width: 980px) {
  .jarvis {
    grid-template-columns: minmax(0, 1fr);
  }
  .jv-side {
    display: none;
  }
  .jv-sugg {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============ Messages ============ */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}
.msg.user {
  align-items: flex-end;
}
.msg.user .msg-body {
  max-width: 78%;
  padding: 11px 16px;
  border-radius: 18px 18px 4px 18px;
  background: var(--inv-bg);
  color: var(--inv-fg);
  font-size: var(--t-14);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: zk-pop 0.35s var(--ease-out) both;
}
.msg-att {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.msg.bot.enter {
  animation: zk-rise 0.4s var(--ease-out) both;
}
.msg-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.msg-steps:empty {
  display: none;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: var(--t-12);
  font-weight: 560;
  color: var(--fg-2);
  animation: zk-rise 0.35s var(--ease-out) both;
}
.step.has-detail {
  cursor: pointer;
}
.step.has-detail:hover {
  border-color: var(--line-2);
}
.step-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--haze-2);
  color: var(--fg);
}
.step.ok .step-ico {
  background: var(--inv-bg);
  color: var(--inv-fg);
}
.step-state {
  display: grid;
  place-items: center;
  color: var(--fg-3);
}
.step.ok .step-state {
  color: var(--fg);
}
.step-detail {
  grid-column: 1 / -1;
  display: none;
  padding: 8px 2px 2px;
  font-family: var(--mono);
  font-size: var(--t-11);
  color: var(--fg-3);
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
  user-select: text;
}
.step.open .step-detail {
  display: block;
}
.thinking {
  display: flex;
  gap: 5px;
  padding: 8px 2px;
}
.thinking i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fg-2);
  animation: zk-pulse 1.2s var(--ease) infinite;
}
.thinking i:nth-child(2) {
  animation-delay: 0.15s;
}
.thinking i:nth-child(3) {
  animation-delay: 0.3s;
}
.msg-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.msg-sources:empty,
.msg-actions:empty {
  display: none;
}
.chip.source {
  max-width: 320px;
  text-decoration: none;
}
.chip.source .src-host {
  flex: none;
  font-weight: 620;
}
.chip.source .src-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--fg-3);
}
.msg-actions {
  display: flex;
  gap: 4px;
  margin-left: -8px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.msg:hover .msg-actions {
  opacity: 1;
}
.task.done {
  opacity: 0.6;
}

/* ============ Premier lancement ============ */
.onb {
  padding: 34px 38px 30px;
}
.onb-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}
.onb-dots span {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--line-2);
  transition: background 0.4s, width 0.5s var(--ease-out);
}
.onb-dots span.on {
  width: 44px;
  background: var(--fg);
}
.onb-dots span.done {
  background: var(--fg-3);
}
.onb-core {
  width: 180px;
  height: 120px;
  margin: -6px 0 6px -18px;
}
.onb-ico {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  margin-bottom: 18px;
  animation: zk-pop 0.5s var(--spring) both;
}
.onb-title {
  font-size: var(--t-30);
  font-weight: 660;
  font-stretch: 120%;
  letter-spacing: -0.025em;
  line-height: 1.08;
  animation: zk-widen 0.9s var(--ease-out) both;
  --stretch: 120%;
}
.onb-text {
  margin-top: 10px;
  font-size: var(--t-16);
  max-width: 60ch;
}
.onb-tips {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
}
.onb-tip {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: start;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.onb-tip .kbd {
  justify-self: start;
  font-size: var(--t-12);
  padding: 4px 10px;
}
.onb-result {
  min-height: 10px;
}

/* ============ Convertir ============ */
.cv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}
.cv-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.dropzone.compact {
  min-height: 110px;
  padding: 18px;
  flex-direction: row;
  gap: 16px;
}
.dropzone.compact .dz-ico {
  width: 40px;
  height: 40px;
}
.dropzone.compact .dz-title {
  font-size: var(--t-14);
}
.dropzone.compact .dz-sub {
  display: none;
}
.cv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cv-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  animation: zk-rise 0.4s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: border-color 0.3s;
}
.cv-file.running {
  border-color: var(--line-3);
}
.cv-file.done {
  border-color: var(--line-2);
}
.cv-file.error .cv-file-sub {
  color: var(--fg);
}
.cv-file-ico {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--haze-2);
}
.cv-file.done .cv-file-ico {
  background: var(--inv-bg);
  color: var(--inv-fg);
  transition: background 0.4s, color 0.4s;
}
.cv-file-name {
  font-weight: 580;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-file-sub {
  font-size: var(--t-12);
  color: var(--fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cv-file .progress {
  margin-top: 8px;
}
.cv-actions {
  display: flex;
  gap: 4px;
}
.cv-panel {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cv-group-label {
  font-size: var(--t-11);
  font-weight: 600;
  color: var(--fg-3);
  margin: 6px 0 -4px;
}
.cv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cv-chips .chip {
  animation: zk-pop 0.35s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 25ms);
}
.cv-engine-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
}
.cv-opts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cv-opts:empty,
.cv-out:empty {
  display: none;
}
.cv-opt {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cv-out {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.cv-go .btn {
  width: 100%;
}
.cv-engines {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 1080px) {
  .cv-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .cv-panel {
    position: static;
  }
}

/* ============ Résumer ============ */
.sm-layout {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.sm-left {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sm-left .tabs {
  margin-bottom: 0;
}
.sm-source-body .dropzone {
  min-height: 180px;
}
.sm-file {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  animation: zk-pop 0.3s var(--ease-out) both;
}
.sm-file-ico {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--inv-bg);
  color: var(--inv-fg);
}
.sm-opts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sm-opt {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sm-opt .seg {
  align-self: flex-start;
  flex-wrap: wrap;
}
.sm-go .btn {
  width: 100%;
}
.sm-result {
  min-width: 0;
}
.sm-placeholder {
  min-height: 420px;
  display: grid;
  place-items: center;
}
.sm-card {
  padding: 28px 32px;
}
.sm-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.sm-title {
  font-size: var(--t-21);
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: -0.012em;
  line-height: 1.2;
}
.sm-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-12);
  color: var(--fg-2);
  white-space: nowrap;
}
.sm-md {
  font-size: var(--t-16);
  line-height: 1.72;
  max-width: 74ch;
}
.sm-actions {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.sm-qa {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: zk-rise 0.4s var(--ease-out) both;
}
.sm-qa .input-group .input {
  flex: 1;
}
.sm-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg);
}
.sm-stage.portrait {
  aspect-ratio: 9 / 16;
  max-width: 420px;
  margin: 0 auto;
}
.sm-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sm-prep {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.sm-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.sm-bar {
  flex: 1;
  height: 4px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  border-radius: 2px;
}
.sm-bar i {
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  border-radius: 2px;
}
@media (max-width: 1100px) {
  .sm-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sm-left {
    position: static;
  }
}

/* ============ Sécurité ============ */
.sec-top {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.sec-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 22px;
}
.sec-dial .dial-value {
  font-size: 64px;
}
.sec-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.sec-count {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sec-count svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.sec-count-n {
  font-size: var(--t-24);
  font-weight: 660;
  font-stretch: 114%;
  line-height: 1;
}
.sec-summary .divider {
  margin: 20px 0;
}
.sec-hist {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 64px;
  margin-top: 10px;
}
.sec-hist-bar {
  flex: 1;
  max-width: 18px;
  height: calc(var(--h) * 100%);
  background: var(--fg-3);
  border-radius: 2px 2px 0 0;
  transform-origin: bottom;
  animation: zk-tick-in 0.6s var(--ease-out) both;
  animation-delay: calc(var(--i) * 25ms);
  transition: background 0.2s;
}
.sec-hist-bar:last-child {
  background: var(--fg);
}
.sec-hist-bar:hover {
  background: var(--fg);
}
.sec-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.sec-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.sec-check:last-child {
  border-bottom: 0;
}
.sec-check-st svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.sec-check.ok .sec-check-st {
  color: var(--fg-3);
}
.sec-check-title {
  font-weight: 600;
}
.sec-check.ok .sec-check-title {
  font-weight: 500;
  color: var(--fg-2);
}
.sec-check-detail {
  font-size: var(--t-13);
  color: var(--fg-2);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.sec-check-fix {
  font-size: var(--t-12);
  color: var(--fg-3);
  margin-top: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--line-2);
}
.sec-check-actions {
  display: flex;
  gap: 6px;
}
.sec-scanning {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  min-height: 260px;
}
.sec-scanline {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--fg);
  box-shadow: 0 0 24px 4px var(--glow);
  animation: sec-sweep 1.8s var(--ease-io) infinite;
}
@keyframes sec-sweep {
  0% { left: 0; }
  50% { left: calc(100% - 2px); }
  100% { left: 0; }
}
.sec-scan-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 22px;
}
.sec-scan-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: var(--t-13);
  animation: zk-rise 0.5s var(--ease-out) both, zk-pulse 2s var(--ease) infinite;
  animation-delay: calc(var(--i) * 80ms), calc(var(--i) * 200ms);
}
.sec-scan-item span:nth-child(2) {
  flex: 1;
}
.sec-tools {
  margin-top: 16px;
}
.sec-tool-out {
  margin-top: 14px;
  min-height: 4px;
}
@media (max-width: 1100px) {
  .sec-top,
  .sec-results {
    grid-template-columns: minmax(0, 1fr);
  }
  .sec-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============ Optimisation ============ */
.op-pc {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.op-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.op-clean-head {
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.op-size {
  min-width: 76px;
  text-align: right;
}
.op-clean-done {
  display: flex;
  align-items: center;
  gap: 18px;
  animation: zk-pop 0.5s var(--spring) both;
}
.op-dup {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  margin-top: 6px;
}
.op-web-form .input-group .input {
  flex: 1;
}
.op-web-out {
  margin-top: 20px;
}
.op-web-head {
  margin-bottom: 18px;
  align-items: flex-end;
}
.op-scores .op-score {
  display: grid;
  place-items: center;
  padding: 22px 10px;
}
.op-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.op-ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.op-ai-in {
  position: sticky;
  top: 0;
}
.op-ai-out:empty {
  display: none;
}
.op-ai-scores {
  align-items: center;
}
.op-ai-scores .big-num {
  font-size: var(--t-48);
}
.op-bullets {
  list-style: none;
  padding: 0;
  margin-top: 8px;
}
.op-bullets li {
  position: relative;
  padding: 6px 0 6px 18px;
  color: var(--fg-2);
  font-size: var(--t-13);
  border-bottom: 1px solid var(--line);
}
.op-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 8px;
  height: 1px;
  background: var(--fg-2);
}
.op-code pre {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: var(--t-13);
  line-height: 1.55;
  white-space: pre-wrap;
  max-height: 460px;
  overflow: auto;
}
.op-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1100px) {
  .op-grid,
  .op-checks,
  .op-ai {
    grid-template-columns: minmax(0, 1fr);
  }
  .op-ai-in {
    position: static;
  }
  .op-bars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============ Presse-papier et capture ============ */
.cp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.cp-left .search,
.cp-left .input {
  flex: 1;
}
.cp-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cp-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  max-height: calc(100vh - 330px);
  min-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.cp-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  animation: zk-rise 0.35s var(--ease-out) both;
  animation-delay: calc(var(--i) * 25ms);
  transition: border-color 0.2s, background 0.2s;
}
.cp-item:hover {
  border-color: var(--line-3);
  background: var(--haze);
}
.cp-item:active {
  transform: scale(0.995);
}
.cp-item.pinned {
  border-color: var(--line-2);
}
.cp-item-ico {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--haze-2);
}
.cp-item-text {
  font-size: var(--t-13);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.cp-item-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}
.cp-item:hover .cp-item-actions,
.cp-item.pinned .cp-item-actions {
  opacity: 1;
}
.cp-swatch {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.cp-swatch.lg {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  transition: transform 0.2s var(--spring);
}
.cp-swatch.lg:hover {
  transform: scale(1.12);
}
.cp-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cp-tiles .tile {
  padding: 14px;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.cp-tiles .tile-title {
  font-size: var(--t-13);
}
.cp-preview:not(:empty) {
  margin-top: 16px;
}
.cp-shot {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  max-height: 300px;
  animation: zk-pop 0.4s var(--ease-out) both;
}
.cp-shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--haze);
}
.cp-ocr:not(:empty) {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cp-ocr-text {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font);
  font-size: var(--t-13);
  white-space: pre-wrap;
  max-height: 260px;
  overflow: auto;
}
.cp-color {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cp-color:empty::before {
  content: "Utilisez la pipette pour récupérer une couleur à l’écran.";
  font-size: var(--t-13);
  color: var(--fg-3);
}
.cp-color-main {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
.cp-color-big {
  width: 110px;
  min-height: 110px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line-2);
  animation: zk-pop 0.4s var(--spring) both;
}
.cp-fmt {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  transition: border-color 0.2s;
}
.cp-fmt:hover {
  border-color: var(--line-3);
}
.cp-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cp-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cp-gallery:empty::before {
  content: "Vos captures apparaîtront ici.";
  grid-column: 1 / -1;
  font-size: var(--t-13);
  color: var(--fg-3);
}
.cp-thumb {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s var(--spring);
}
.cp-thumb:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
}
.cp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cp-pick {
  position: relative;
  cursor: crosshair;
}
.cp-pick-img {
  width: 100%;
  border-radius: 8px;
}
.cp-loupe {
  position: absolute;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: var(--t-12);
  pointer-events: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--fg);
}
@media (max-width: 1100px) {
  .cp-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============ Productivité ============ */
.pd-add {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.pd-add > .input.lg {
  flex: 1;
  min-width: 240px;
}
.pd-add .select-wrap {
  width: 190px;
}
.pd-tasks {
  padding: 4px 18px;
}
.pd-task {
  animation: zk-rise 0.35s var(--ease-out) both;
  animation-delay: calc(var(--i) * 25ms);
}
.li.done .li-title {
  color: var(--fg-3);
}
.pd-notes {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 330px);
}
.pd-notes-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.pd-notes-head {
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.pd-notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.pd-note-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
  transition: background 0.2s;
}
.pd-note-item:hover {
  background: var(--haze);
}
.pd-note-item.on {
  background: var(--inv-bg);
  color: var(--inv-fg);
}
.pd-note-item.on .faint {
  color: var(--inv-fg);
  opacity: 0.6;
}
.pd-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.pd-note-title {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font-size: var(--t-24);
  font-weight: 640;
  font-stretch: 114%;
  letter-spacing: -0.015em;
}
.pd-note-title:focus-visible {
  outline: none;
}
.pd-note-body {
  flex: 1;
  min-height: 380px;
  border: 0;
  background: none;
  resize: none;
  font-family: var(--mono);
  font-size: var(--t-14);
  line-height: 1.7;
}
.pd-note-body:focus-visible {
  outline: none;
}
.pd-note-preview {
  flex: 1;
  min-height: 380px;
  font-size: var(--t-16);
}
.pd-focus {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.pd-focus-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 32px;
}
.pd-ring {
  position: relative;
  width: min(340px, 70vw);
  aspect-ratio: 1;
}
.pd-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.pd-ring-bg {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
}
.pd-ring-fg {
  fill: none;
  stroke: var(--fg);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s linear;
}
.pd-ring.running .pd-ring-fg {
  filter: drop-shadow(0 0 6px var(--glow));
}
.pd-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pd-time {
  font-size: 76px;
  font-weight: 640;
  font-stretch: 118%;
  letter-spacing: -0.03em;
  line-height: 1;
}
.pd-mode {
  font-size: var(--t-13);
  font-weight: 600;
  color: var(--fg-2);
  font-stretch: 112%;
}
.pd-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 1000px) {
  .pd-notes,
  .pd-focus {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============ Outils dev ============ */
.dv-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.dv-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dv-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  text-align: left;
  color: var(--fg-2);
  animation: zk-rise 0.4s var(--ease-out) both;
  animation-delay: calc(var(--i) * 20ms);
  transition: background 0.2s, color 0.2s;
}
.dv-nav-item:hover {
  background: var(--haze);
  color: var(--fg);
}
.dv-nav-item.on {
  background: var(--inv-bg);
  color: var(--inv-fg);
}
.dv-nav-item.on .faint {
  color: var(--inv-fg);
  opacity: 0.6;
}
.dv-panel {
  min-width: 0;
}
.dv-panel-head {
  margin-bottom: 20px;
}
.dv-tool {
  animation: zk-rise 0.4s var(--ease-out) both;
}
.dv-bar {
  margin-bottom: 14px;
}
.dv-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.dv-outs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}
.dv-out-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.dv-out-val {
  font-family: var(--mono);
  font-size: var(--t-13);
  overflow-wrap: anywhere;
}
.dv-regex-view {
  min-height: 60px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: var(--t-13);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 8px;
}
.dv-regex-view mark {
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-radius: 3px;
  padding: 0 2px;
}
.dv-regex-view:empty {
  display: none;
}
.dv-groups {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.dv-pw {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 560;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  animation: zk-fade 0.3s both;
}
.dv-pre {
  margin: 6px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: var(--t-12);
  white-space: pre-wrap;
  overflow: auto;
  max-height: 340px;
}
.dv-diff {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: var(--t-12);
  max-height: 420px;
  overflow: auto;
}
.dv-diff:empty {
  display: none;
}
.dv-diff-line {
  display: flex;
  gap: 10px;
  padding: 1px 12px;
  white-space: pre-wrap;
}
.dv-diff-line.add {
  background: var(--haze-3);
}
.dv-diff-line.del {
  color: var(--fg-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-3);
}
.dv-diff-sign {
  width: 10px;
  flex: none;
  color: var(--fg-3);
}
.dv-md {
  font-size: var(--t-14);
}
@media (max-width: 980px) {
  .dv-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .dv-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }
  .dv-nav-item {
    width: auto;
    flex: none;
  }
}

/* ============ Fichiers et système ============ */
.sy-disks {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sy-rename {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.sy-rules {
  position: sticky;
  top: 0;
}
.sy-rules .divider {
  margin: 20px 0 14px;
}
.sy-preview {
  max-height: calc(100vh - 300px);
  overflow: auto;
}
.sy-preview tr.conflict td {
  background: var(--haze-3);
}
@media (max-width: 1100px) {
  .sy-rename {
    grid-template-columns: minmax(0, 1fr);
  }
  .sy-rules {
    position: static;
  }
}

/* ============ Réglages ============ */
.st-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.st-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.st-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--fg-2);
  text-decoration: none;
  font-weight: 540;
  transition: background 0.2s, color 0.2s;
}
.st-nav-item:hover {
  background: var(--haze);
  color: var(--fg);
}
.st-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
}
.st-section {
  scroll-margin-top: 20px;
}
.st-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.st-row:last-child {
  border-bottom: 0;
}
.st-row-text {
  min-width: 0;
}
.st-row .seg {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.st-kbd {
  font-size: var(--t-13);
  padding: 5px 12px;
}
.st-srv:empty {
  display: none;
}
.st-about {
  display: flex;
  align-items: center;
  gap: 20px;
}
.st-logo {
  width: 72px;
  height: 72px;
  color: var(--fg);
  animation: zk-pop 0.6s var(--spring) both;
}
@media (max-width: 980px) {
  .st-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .st-nav {
    display: none;
  }
  .st-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
