/*
 * 04-contrats.css
 * Contrats, signature et pages légales.
 */

/* ---- contrats ---- */
.contract-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}
.paper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow:
    0 1px 0 var(--line),
    0 20px 50px rgba(31, 26, 53, 0.08);
  padding: clamp(22px, 5vw, 56px);
  font-family: Georgia, "Times New Roman", serif;
  color: #26213d;
  line-height: 1.65;
  min-width: 0;
  overflow-wrap: anywhere;
}
.paper-head {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 14px;
  margin-bottom: 22px;
  font-family: var(--f-body);
}
.paper-head span {
  display: block;
  font-size: 12px;
  color: var(--ink-faint);
}
.paper h1 {
  font-family: var(--f-display);
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 4px;
  color: #1f1a35;
}
.paper-sub {
  font-style: italic;
  color: var(--ink-faint);
  margin: 0 0 16px;
}
.paper .party {
  margin: 0 0 10px;
}
.paper h3 {
  font-family: var(--f-body);
  font-size: 15px;
  margin: 18px 0 4px;
  color: #1f1a35;
}
.paper p {
  margin: 0 0 8px;
  font-size: 15px;
}
.sigs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--f-body);
}
.sig {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 120px;
}
.sig span {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-soft);
}
.sig img {
  max-width: 220px;
  height: auto;
}
.sigtype {
  font-family: "Caveat", "Segoe Script", "Brush Script MT", cursive;
  font-size: 26px;
  font-weight: 600;
  color: #1f1a35;
}
.sig em {
  font-size: 12px;
  color: var(--ink-faint);
}
.hash {
  font-family: var(--f-body);
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 12px !important;
  word-break: break-all;
}
.recap {
  margin-bottom: 18px;
  border-left: 4px solid var(--accent);
}
.recapdl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0;
}
.recapdl dt {
  color: var(--ink);
  opacity: 0.7;
  font-size: 0.9em;
}
.recapdl dd {
  margin: 0;
}
.readwrap {
  min-width: 0;
}
.readbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 10px;
  color: #6b4a00;
}
.readbar i {
  display: block;
  height: 6px;
  border-radius: 9px;
  background: var(--line, #e6e3f0);
  overflow: hidden;
}
.readbar i b {
  display: block;
  height: 100%;
  background: #e0a100;
  transition: width 0.15s;
}
.readbar.ok {
  color: #1b7a4b;
}
.readbar.ok i b {
  background: #1b9a5b;
}
.readscroll {
  max-height: 72vh;
  overflow: auto;
  border-radius: 8px;
  overscroll-behavior: contain;
}
.signbox button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .recapdl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .recapdl dd {
    margin-bottom: 8px;
  }
  .readscroll {
    max-height: 65vh;
  }
}
.signbox {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
}
.sigpad {
  width: 100%;
  height: auto;
  aspect-ratio: 560/190;
  max-width: 100%;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0 140px,
      var(--line-strong) 140px 141px,
      transparent 141px
    ),
    #fff;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  touch-action: none;
  cursor: crosshair;
}
.docico {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--side-on);
  color: var(--accent);
  flex: none;
}
.docico svg {
  width: 20px;
  height: 20px;
}
@media (max-width: 980px) {
  .phero-in,
  .split2,
  .contract-grid {
    grid-template-columns: 1fr;
  }
  .phero-art {
    min-height: 320px;
  }
  .signbox {
    position: static;
  }
  .pfoot-in {
    grid-template-columns: 1fr 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .stats-band {
    grid-template-columns: repeat(2, 1fr);
  }
  .plinks {
    display: none;
  }
}
@media (max-width: 560px) {
  .float.f1 {
    left: 0;
  }
  .float.f2 {
    right: 0;
  }
  .sigs {
    grid-template-columns: 1fr;
  }
  .pfoot-in {
    grid-template-columns: 1fr;
  }
  .ptop {
    flex-wrap: nowrap;
  }
  .ptop .pbrand b {
    font-size: 16px;
  }
  .ptop .btn {
    padding: 7px 10px;
    font-size: 13px;
  }
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: sticky;
    top: env(safe-area-inset-top, 0px);
    height: auto;
    z-index: 20;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 16px;
    gap: 10px;
  }
  .navlist {
    flex-direction: row;
    overflow-x: auto;
    order: 3;
    width: 100%;
    gap: 4px;
    scrollbar-width: none;
  }
  .navbtn {
    padding: 7px 10px;
  }
  .navbtn.on {
    box-shadow: none;
  }
  .navgroup {
    display: none;
  }
  .side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 6px 20px rgba(31, 26, 53, 0.05);
  }
  .who {
    margin: 0 0 0 auto;
    border: 0;
    padding: 0;
    flex-direction: row;
    align-items: center;
  }
  .who .wname {
    display: none;
  }
  .logout span {
    display: none;
  }
  .cols,
  .split {
    grid-template-columns: 1fr;
  }
  .dm {
    grid-template-columns: 1fr;
  }
  .dm-list {
    border-right: 0;
    max-height: none;
  }
  .dm.has-sel .dm-list {
    display: none;
  }
  .dm:not(.has-sel) .dm-pane {
    display: none;
  }
}
@media (max-width: 520px) {
  .seyes {
    --mg: 30px;
    padding: 32px 14px 32px calc(var(--mg) + 12px);
    font-size: 16px;
  }
  .seyes .date {
    display: none;
  }
  .meet {
    grid-template-columns: 62px 1fr;
  }
  .meet .acts {
    grid-column: 1/-1;
  }
  .msg {
    max-width: 90%;
  }
  .brand b {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
