/* Desktop redesign (≥1024px) — Standalone pages: /code, the legal pages (cgu, confidentialite, mentions-legales) and the login page.
   Tokens, fonts, the header and the footer come from desktop.css. Every rule in this file goes inside
   @media (min-width: 1024px): below 1024px nothing changes. Selectors start with the page's body
   (body.code-page, body.legal-page, body[data-auth-root]) so the account page's login sheet is never touched;
   the sheet's form style is shared with the sign-in page through login.css. */
@media (min-width: 1024px) {
  /* ---------- /code (code.html in the package): copy and form on the left, the real sticker on the right ---------- */
  body.code-page > .code-content {
    box-sizing: border-box; flex: 1 0 auto; width: 100%; max-width: var(--tm-container); margin: 0 auto; padding: 72px var(--tm-gutter) 0;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; align-items: center; align-content: start; justify-content: normal;
  }
  body.code-page .code-copy { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
  body.code-page .code-visual { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 36px; min-width: 0; }
  body.code-page .code-eyebrow { font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: var(--tm-muted); }
  body.code-page .code-copy .auth-title { margin: 0; font-family: "Sora", "Manrope", system-ui, sans-serif; font-size: 56px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; text-align: start; }
  body.code-page .code-copy .auth-subtitle { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.5; color: var(--tm-muted); text-align: start; }

  body.code-page #codeForm { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 12px 10px; width: 100%; max-width: 520px; }
  body.code-page .code-label { grid-column: 1 / -1; grid-row: 1; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--tm-muted); }
  body.code-page .code-input-group { grid-column: 1; grid-row: 2; box-sizing: border-box; height: 64px; gap: 10px; padding-block: 0; padding-inline: 18px 10px; border: 2px solid var(--tm-border-strong); border-radius: 16px; box-shadow: none; }
  body.code-page .code-input-group:focus-within { border-color: var(--tm-orange); box-shadow: 0 0 0 4px #FFE3D6; }
  body.code-page .code-input-group.is-invalid { border-color: #d92d20; box-shadow: 0 0 0 4px rgba(217, 45, 32, .12); }
  body.code-page .code-prefix { font-size: 22px; }
  body.code-page .code-input-group .input-divider { height: 28px; margin: 0; background-color: var(--tm-border-strong); }
  body.code-page .code-input { font-size: 22px; font-weight: 700; letter-spacing: .08em; }
  body.code-page .code-input::placeholder { letter-spacing: .08em; }
  body.code-page #codeSubmit { grid-column: 2; grid-row: 2; width: auto; height: 64px; padding: 0 28px; border-radius: 16px; background: var(--tm-orange); color: #fff; font-size: 17px; white-space: nowrap; transition: background-color .15s ease, opacity .15s ease; }
  body.code-page #codeSubmit:hover { background: var(--tm-orange-hover); }
  body.code-page #codeSubmit.is-busy::after { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
  body.code-page .code-submit-label { display: inline-flex; align-items: center; gap: 8px; }
  body.code-page .code-submit-label::after {
    content: ""; width: 20px; height: 20px; flex: none; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  [dir="rtl"] body.code-page .code-submit-label::after { transform: scaleX(-1); }
  body.code-page #codeError { grid-column: 1 / -1; grid-row: 3; margin: 0; }
  body.code-page .code-help { margin: -12px 0 0; max-width: 520px; font-size: 13px; line-height: 1.5; color: var(--tm-muted); text-align: start; }

  body.code-page .code-trust { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 8px 0 0; border: 0; border-radius: 0; background: none; }
  body.code-page .code-trust div { gap: 12px; font-size: 16px; font-weight: 700; line-height: 1.35; }
  body.code-page .code-trust ph-icon { width: 40px; height: 40px; border-radius: 12px; background: #FFF0E8; color: var(--tm-orange); }

  body.code-page .code-sticker { order: 0; width: 440px; max-width: 100%; margin: 0; }
  body.code-page .code-sticker img { border-radius: 17px; transform: none; box-shadow: 0 40px 70px -40px rgba(255, 84, 0, .8); }
  body.code-page .code-callout { inset-inline-end: 18px; bottom: -16px; padding: 7px 12px; font-size: 13px; }
  body.code-page .code-scan-note {
    display: flex; align-items: center; gap: 14px; box-sizing: border-box; width: 440px; max-width: 100%; margin: 0; padding: 18px 22px;
    border: 1px solid var(--tm-border); border-radius: var(--tm-radius-card); background: var(--tm-surface); color: var(--tm-muted); font-size: 14px; line-height: 1.45;
  }
  body.code-page .code-scan-note ph-icon { flex: none; color: var(--tm-orange); }

  /* ---------- Legal pages (legal.html in the package): side menu + 760px reading column ---------- */
  body.legal-page > .legal-content {
    box-sizing: border-box; flex: 1 0 auto; width: 100%; max-width: var(--tm-container); margin: 0 auto; padding: 36px var(--tm-gutter) 0;
    display: grid; grid-template-columns: 240px minmax(0, 760px); column-gap: 40px; align-content: start;
  }
  body.legal-page .legal-content > nav { grid-column: 1; grid-row: 1 / span 3; align-self: start; position: sticky; top: calc(var(--tm-header-h) + 24px); }
  body.legal-page .legal-nav { flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0; }
  body.legal-page .legal-nav a { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--tm-ink); font-size: 15px; font-weight: 600; line-height: 1.3; transition: background-color .15s ease; }
  body.legal-page .legal-nav a:hover { background: rgba(255, 255, 255, .6); }
  body.legal-page .legal-nav a[aria-current="page"] { background: var(--tm-surface); border-color: var(--tm-border); color: var(--tm-ink); }
  body.legal-page .legal-nav ph-icon { display: none; }
  body.legal-page .legal-content > :is(.legal-title, .legal-updated, .legal-body) { grid-column: 2; }
  body.legal-page .legal-title { margin: 0 0 18px; font-family: "Sora", "Manrope", system-ui, sans-serif; font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
  body.legal-page .legal-updated { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--tm-muted); }
  body.legal-page .legal-body { font-size: 16px; line-height: 1.7; }
  body.legal-page .legal-body h2 { margin: 30px 0 18px; font-family: "Sora", "Manrope", system-ui, sans-serif; font-size: 22px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em; }
  body.legal-page .legal-body > h2:first-child { margin-top: 12px; }
  body.legal-page .legal-body h3 { margin: 24px 0 10px; font-size: 17px; }
  body.legal-page .legal-body p { margin: 0 0 18px; }
  body.legal-page .legal-body li { margin: 0 0 8px; }
  body.legal-page .legal-body ul { margin: 0 0 18px; }
  body.legal-page .legal-body table { margin: 8px 0 24px; font-size: 15px; }
  body.legal-page .legal-card { margin: 12px 0 24px; padding: 18px 22px; border-color: var(--tm-border); border-radius: var(--tm-radius-card); }
  /* The shared footer carries the same links. */
  body.legal-page .legal-footer { display: none; }

  /* ---------- Sign-in (connexion.html in the package): dark brand panel + the shared login screens ---------- */
  body[data-auth-root] { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; }
  body[data-auth-root] > .login-aside {
    grid-column: 1; grid-row: 1 / span 2; align-self: start; position: sticky; top: 0; box-sizing: border-box; height: 100dvh; overflow: hidden;
    display: flex; flex-direction: column; gap: 28px; padding: 48px 56px; background: var(--tm-ink); color: #fff;
  }
  body[data-auth-root] .login-aside-logo { display: flex; align-items: center; gap: 9px; width: fit-content; color: #fff; text-decoration: none; font-family: "Sora", "Manrope", system-ui, sans-serif; font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
  body[data-auth-root] .login-aside-logo img { display: block; width: 28px; height: 28px; }
  body[data-auth-root] .login-aside-logo:focus-visible { outline: 2px solid var(--tm-orange); outline-offset: 4px; border-radius: 6px; }
  body[data-auth-root] .login-aside-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 520px; }
  body[data-auth-root] .login-aside-title { margin: 0; font-family: "Sora", "Manrope", system-ui, sans-serif; font-size: 52px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; color: #fff; }
  body[data-auth-root] .login-aside-title span { color: var(--tm-orange); }
  body[data-auth-root] .login-aside-points { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: 16px; line-height: 1.4; color: #C9CED4; }
  body[data-auth-root] .login-aside-points li { display: flex; align-items: center; gap: 12px; }
  body[data-auth-root] .login-aside-points ph-icon { flex: none; color: var(--tm-lime); }
  body[data-auth-root] .login-aside-sticker { display: block; width: 100%; max-width: 380px; height: auto; margin-top: 12px; border-radius: 15px; }

  body[data-auth-root] > .auth-header { grid-column: 2; grid-row: 1; height: 72px; padding-top: 0; }
  body[data-auth-root] > .auth-header :is(.auth-back, .auth-close) { top: 0; padding: 16px 24px; }
  body[data-auth-root] > .auth-content { grid-column: 2; grid-row: 2; align-self: stretch; justify-content: center; box-sizing: border-box; width: 100%; max-width: 468px; margin: 0 auto; padding: 24px 24px 96px; }
  body[data-auth-root] .auth-screen { flex: 0 0 auto; }
  body[data-auth-root] :is(#auth-email, #auth-password, #auth-verify, #auth-phone[data-mode="add"]) { padding-top: 0; }
  /* The brand panel already carries the logo. */
  body[data-auth-root] .auth-brand { display: none; }
  body[data-auth-root] .auth-title { margin: 0 0 8px; font-family: "Sora", "Manrope", system-ui, sans-serif; font-size: 30px; line-height: 1.15; text-align: start; }
  body[data-auth-root] :is(#auth-verify, #auth-phone[data-mode="add"]) .auth-title { font-family: "Sora", "Manrope", system-ui, sans-serif; font-size: 30px; }
  body[data-auth-root] .auth-subtitle { margin: 0 0 24px; text-align: start; }
  body[data-auth-root] .verify-badge-container { justify-content: flex-start; margin-bottom: 16px; }
  body[data-auth-root] .otp-container { justify-content: flex-start; }
  body[data-auth-root] .resend-text { margin-bottom: 24px; text-align: start; }
  body[data-auth-root] #verify-form { flex: none; }
  body[data-auth-root] .mt-auto { margin-top: 0; }
  body[data-auth-root] .auth-divider { margin: 20px 0; }
  body[data-auth-root] .auth-legal { margin-top: 24px; padding-top: 0; }
  body[data-auth-root] .auth-bottom-action { margin-top: 24px; padding-top: 0; }
  body[data-auth-root] .add-step { gap: 20px; }
}
/* Short desktop windows: the brand panel scrolls with the page instead of being clipped. */
@media (min-width: 1024px) and (max-height: 640px) {
  body[data-auth-root] > .login-aside { position: relative; align-self: stretch; height: auto; min-height: 100dvh; }
}
