/* Conditions générales — AfterClinic */

.legal-page {
  --legal-surface: #f7fcfd;
  --legal-soft: #eaf8fb;
  --legal-border: #d8ebef;
  --legal-ink: #153f62;
}

.legal-page main {
  background: #fff;
}

.legal-hero {
  position: relative;
  min-height: 354px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 24%, rgba(255,255,255,.96), transparent 30%),
    linear-gradient(100deg, #eef9fd 0%, #f9fcfd 50%, #edf7fa 100%);
}

.legal-hero-inner {
  position: relative;
  min-height: 354px;
  display: flex;
  align-items: center;
}

.legal-hero-copy {
  position: relative;
  z-index: 3;
  width: 56%;
  max-width: 730px;
  padding: 38px 0 36px;
}

.legal-kicker {
  width: max-content;
  margin: 0 0 13px;
  padding: 7px 14px;
  color: #287f98;
  background: #dff5f8;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  line-height: 1;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 720px;
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(43px, 4.2vw, 64px);
  font-weight: 650;
  letter-spacing: -2.1px;
  line-height: 1.02;
}

.legal-hero-lead {
  max-width: 630px;
  margin: 0;
  color: #4e7088;
  font-size: 17px;
  line-height: 1.48;
}

.legal-updated {
  margin: 14px 0 0;
  color: #6d899c;
  font-size: 12px;
  font-weight: 600;
}

.legal-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.legal-doc-action {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  background: #fff;
  border: 1px solid #c5dde4;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15,70,100,.04);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.legal-doc-action .icon {
  width: 17px;
  height: 17px;
}

.legal-doc-action:hover,
.legal-doc-action:focus-visible {
  color: #067e98;
  background: #f4fdff;
  border-color: #9fd2de;
}

.legal-doc-action:disabled {
  opacity: .65;
  cursor: wait;
}

.legal-export-status {
  min-height: 1.2em;
  margin: 8px 0 0;
  color: #067e98;
  font-size: 12px;
  font-weight: 600;
}

.legal-print-only {
  display: none;
}

.legal-print-only.is-visible {
  display: block;
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid #d8ebef;
}

.legal-print-brand {
  margin: 0 0 6px;
  color: #067e98;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.legal-print-title {
  margin: 0 0 6px;
  color: #0b3556;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
}

.legal-print-meta {
  margin: 0;
  color: #6d899c;
  font-size: 12px;
  font-weight: 600;
}

body.legal-pdf-capture::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(255, 255, 255, .88);
  pointer-events: none;
}

body.legal-pdf-capture #legal-document {
  position: relative;
  z-index: 99991;
}

.legal-hero-photo {
  position: absolute;
  z-index: 1;
  top: 0;
  right: calc(50% - 50vw);
  bottom: 0;
  width: 59vw;
  background:
    linear-gradient(90deg,
      #eef9fd 0%,
      #eef9fd 6%,
      rgba(238,249,253,.98) 14%,
      rgba(238,249,253,.88) 22%,
      rgba(238,249,253,.62) 34%,
      rgba(238,249,253,.28) 46%,
      rgba(238,249,253,.06) 58%,
      transparent 72%),
    linear-gradient(180deg, rgba(238,249,253,.2) 0%, transparent 22%),
    url("legal-doctor-signing-documents.jpg") 68% 38% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.12) 20%, rgba(0,0,0,.55) 36%, #000 54%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.12) 20%, rgba(0,0,0,.55) 36%, #000 54%);
}

.legal-promises {
  position: relative;
  z-index: 4;
  background: #eef9fb;
  border-top: 1px solid #d9edf1;
  border-bottom: 1px solid #d9edf1;
}

.legal-promise-grid {
  min-height: 84px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.legal-promise {
  min-width: 0;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #52738a;
  font-size: 12px;
  line-height: 1.35;
}

.legal-promise + .legal-promise {
  border-left: 1px solid #d4e9ed;
}

.legal-promise-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--cyan-dark);
  background: rgba(255,255,255,.85);
  border: 1px solid #d1eaee;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(16,101,121,.06);
}

.legal-promise-icon .icon {
  width: 25px;
  height: 25px;
}

.legal-content {
  padding: 42px 0 48px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 126px;
  overflow: hidden;
  background: var(--legal-surface);
  border: 1px solid var(--legal-border);
  border-radius: 13px;
  box-shadow: 0 7px 22px rgba(15,70,100,.04);
}

.legal-sidebar-title {
  margin: 0;
  padding: 16px 18px 12px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.legal-nav {
  display: block;
}

.legal-nav a {
  position: relative;
  min-height: 40px;
  padding: 10px 18px 10px 23px;
  display: flex;
  align-items: center;
  color: #55758c;
  border-top: 1px solid #e2eef1;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  transition: color .18s ease, background .18s ease;
}

.legal-nav a::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: transparent;
}

.legal-nav a:hover,
.legal-nav a:focus-visible,
.legal-nav a.is-active {
  color: #067e98;
  background: #edf9fb;
}

.legal-nav a.is-active {
  font-weight: 700;
}

.legal-nav a.is-active::before {
  background: var(--cyan);
}

.legal-sidebar-help {
  padding: 18px;
  background: #fff;
  border-top: 1px solid var(--legal-border);
}

.legal-sidebar-help-head {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-sidebar-help-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--cyan-dark);
  background: #e9f9fb;
  border-radius: 50%;
}

.legal-sidebar-help-icon .icon {
  width: 21px;
  height: 21px;
}

.legal-sidebar-help strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.25;
}

.legal-sidebar-help p {
  margin: 2px 0 0;
  color: #718b9d;
  font-size: 11px;
  line-height: 1.35;
}

.legal-sidebar-help .button {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  justify-content: center;
  font-size: 12px;
}

.legal-article {
  min-width: 0;
  max-width: 860px;
}

.legal-section {
  scroll-margin-top: 136px;
  margin: 0 0 25px;
  padding: 0 0 25px;
  border-bottom: 1px solid #e1ecef;
}

.legal-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.legal-section h2 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.25px;
  line-height: 1.25;
}

.legal-section h3 {
  margin: 18px 0 7px;
  color: var(--legal-ink);
  font-size: 16px;
  font-weight: 700;
}

.legal-section p {
  max-width: 76ch;
  margin: 0 0 10px;
  color: #55748a;
  font-size: 14px;
  line-height: 1.65;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-list {
  max-width: 76ch;
  margin: 12px 0;
  padding: 0;
  display: grid;
  gap: 9px;
  list-style: none;
}

.legal-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: #55748a;
  font-size: 14px;
  line-height: 1.5;
}

.legal-list-icon {
  width: 19px;
  height: 19px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--cyan);
  border-radius: 50%;
}

.legal-list-icon .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.legal-list.is-prohibited .legal-list-icon {
  background: #e35b67;
}

.legal-contact-box {
  margin-top: 14px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--legal-surface);
  border: 1px solid var(--legal-border);
  border-radius: 10px;
}

.legal-contact-box a {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
  background: #fff;
  border: 1px solid #dcecef;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
}

.legal-contact-box a:hover,
.legal-contact-box a:focus-visible {
  border-color: #8dd6df;
  color: #067e98;
}

.legal-contact-box .icon {
  width: 19px;
  height: 19px;
  color: var(--cyan-dark);
}

.legal-cta-wrap {
  padding: 0 0 48px;
}

.legal-cta {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 82% 25%, rgba(255,255,255,.9), transparent 26%),
    linear-gradient(105deg, #e5f7fb 0%, #f6fbfd 62%, #e8f7fa 100%);
  border: 1px solid #d5ebef;
  border-radius: 15px;
}

.legal-cta-photo {
  position: absolute;
  inset: 0 auto 0 0;
  width: 36%;
  background: url("afterclinic-hero-woman.jpg") 66% 49% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 68%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 68%, transparent 100%);
}

.legal-cta-copy {
  position: relative;
  z-index: 2;
  width: 52%;
  margin-left: 38%;
  padding: 30px 24px;
}

.legal-cta-eyebrow {
  margin: 0 0 4px;
  color: #66879b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.legal-cta h2 {
  margin: 0 0 7px;
  color: var(--navy);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -.5px;
  line-height: 1.15;
}

.legal-cta-copy > p:not(.legal-cta-eyebrow) {
  max-width: 540px;
  margin: 0 0 15px;
  color: #56768c;
  font-size: 14px;
  line-height: 1.5;
}

.legal-cta .button {
  min-width: 176px;
  justify-content: center;
}

.legal-cta-assurance {
  position: absolute;
  z-index: 2;
  right: 36px;
  width: 190px;
  color: #2c7f96;
  font-size: 15px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 1180px) {
  .legal-hero-photo {
    width: 57vw;
  }

  .legal-layout {
    grid-template-columns: 244px minmax(0, 1fr);
    gap: 30px;
  }

  .legal-cta-assurance {
    display: none;
  }

  .legal-cta-copy {
    width: 60%;
  }
}

@media (max-width: 920px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-sidebar {
    position: static;
  }

  .legal-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .legal-nav a:nth-child(2) {
    border-top: 1px solid #e2eef1;
  }

  .legal-sidebar-help {
    display: none;
  }

  .legal-article {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .legal-hero,
  .legal-hero-inner {
    min-height: 0;
  }

  .legal-hero-inner {
    width: 100%;
    display: block;
  }

  .legal-hero-copy {
    width: min(calc(100% - 32px), 620px);
    max-width: none;
    margin-inline: auto;
    padding: 28px 0 24px;
    text-align: center;
  }

  .legal-kicker {
    margin-inline: auto;
  }

  .legal-hero h1 {
    font-size: clamp(38px, 11vw, 52px);
    letter-spacing: -1.5px;
  }

  .legal-hero-lead {
    font-size: 16px;
  }

  .legal-doc-actions {
    justify-content: center;
  }

  .legal-hero-photo {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 260px;
    background:
      linear-gradient(180deg,
        #eef9fd 0%,
        rgba(238,249,253,.92) 10%,
        rgba(238,249,253,.45) 26%,
        rgba(238,249,253,.08) 42%,
        transparent 55%),
      url("legal-doctor-signing-documents.jpg") 58% 42% / cover no-repeat;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .legal-promise-grid {
    grid-template-columns: 1fr 1fr;
  }

  .legal-promise {
    min-height: 82px;
    padding: 12px;
    font-size: 11px;
  }

  .legal-promise:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #d4e9ed;
  }

  .legal-promise:nth-child(4) {
    border-top: 1px solid #d4e9ed;
  }

  .legal-content {
    padding: 30px 0 36px;
  }

  .legal-layout {
    gap: 28px;
  }

  .legal-nav {
    grid-template-columns: 1fr;
  }

  .legal-nav a {
    min-height: 44px;
    font-size: 13px;
  }

  .legal-section {
    scroll-margin-top: 106px;
  }

  .legal-section h2 {
    font-size: 21px;
  }

  .legal-section p,
  .legal-list li {
    font-size: 16px;
  }

  .legal-contact-box {
    grid-template-columns: 1fr;
  }

  .legal-cta-wrap {
    padding-bottom: 36px;
  }

  .legal-cta {
    display: block;
  }

  .legal-cta-photo {
    position: relative;
    width: 100%;
    height: 190px;
    background-position: 50% 48%;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 70%, transparent 100%);
  }

  .legal-cta-copy {
    width: 100%;
    margin-left: 0;
    padding: 12px 22px 26px;
    text-align: center;
  }

  .legal-cta h2 {
    font-size: 25px;
  }

  .legal-cta-copy > p:not(.legal-cta-eyebrow) {
    margin-inline: auto;
  }
}

@media (max-width: 440px) {
  .legal-promise-grid {
    grid-template-columns: 1fr;
  }

  .legal-promise + .legal-promise {
    border-top: 1px solid #d4e9ed;
    border-left: 0;
  }

  .legal-promise {
    min-height: 70px;
  }

  .legal-promise-icon {
    width: 42px;
    height: 42px;
  }
}

@media print {
  .skip-link,
  header,
  footer,
  .legal-hero-photo,
  .legal-promises,
  .legal-sidebar,
  .legal-cta-wrap,
  .legal-doc-actions,
  .legal-export-status {
    display: none !important;
  }

  .legal-page main,
  .legal-content,
  .legal-layout,
  .legal-article {
    background: #fff !important;
    box-shadow: none !important;
  }

  .legal-hero {
    display: none !important;
  }

  .legal-content {
    padding-top: 0;
  }

  .legal-layout {
    display: block;
  }

  .legal-article {
    max-width: none;
  }

  .legal-print-only {
    display: block;
    margin: 0 0 18px;
    padding: 0 0 14px;
    border-bottom: 1px solid #d8ebef;
  }

  .legal-print-brand {
    margin: 0 0 4px;
    color: #067e98;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
  }

  .legal-print-title {
    margin: 0 0 4px;
    color: #0b3556;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
  }

  .legal-print-meta {
    margin: 0;
    color: #6d899c;
    font-size: 11px;
    font-weight: 600;
  }

  .legal-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .legal-section h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .legal-list li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a[href^="http"]::after,
  a[href^="mailto"]::after,
  a[href^="tel"]::after {
    content: " (" attr(href) ")";
    font-size: 10px;
    font-weight: 400;
    color: #55758c;
  }

  .legal-contact-box a::after {
    content: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-nav a,
  .legal-doc-action {
    transition: none;
  }
}
