/* The pages that call the backend (code, document, upload, paiement): what their live markup and style files
   (public/css/code.css, document.css, upload.css, copied unchanged) take from the live site's style.css and cms.css.
   Only these rules, scoped to .backend-page, so the rest of the new site is not touched. */
:root {
  --cms-color-primary: #0a67a7;
  --cms-color-primary-rgb: 10, 103, 167;
  --cms-color-primary-hover: #085488;
  --cms-color-primary-dark: #054e83;
  --cms-color-muted: #6b7280;
  --cms-color-surface: #fff;
  --cms-color-surface-soft: #f8fafc;
  --cms-radius-button: 28px;
  --cms-font-body: Poppins, system-ui, sans-serif;
  --title-color: var(--cms-color-primary-dark);
  --color-action: var(--cms-color-primary);
  --color-action-hover: var(--cms-color-primary-hover);
  --color-background-card: var(--cms-color-surface);
  --text-color: #374151;
}

/* The site's text: regular, in Poppins (design review 2026-11-18, finding 6: no light text); the form fields in the
   same font. */
.backend-page { font-weight: 400; color: var(--text-color); }
.backend-page h1, .backend-page h2 { color: var(--title-color); }
.backend-page input, .backend-page textarea, .backend-page select, .backend-page button { font-family: inherit; }
.backend-page .hidden { display: none !important; }
.backend-page .page-content { max-width: 1000px; margin: 0 auto; padding: 3rem 1.75rem 1.5rem; }

/* The buttons (style.css): blue and full width; the outlined one white with a blue line. */
.backend-page .btn, .backend-page .btn-primary, .backend-page .btn-outline-custom {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 100%;
  padding: 16px 32px; border: none; border-radius: var(--cms-radius-button);
  background-color: var(--color-action); color: #fff; font-weight: 500; font-size: 1.125rem; text-align: center;
  text-decoration: none; cursor: pointer; box-shadow: none; transition: background-color .2s ease, opacity .2s ease, color .2s ease, border-color .2s ease;
}
@media (hover: hover) { .backend-page .btn:hover { background-color: var(--color-action-hover); opacity: .95; color: #fff; } }
.backend-page .btn:active { opacity: .9; }
.backend-page .btn-outline-custom { background: var(--cms-color-surface) !important; color: var(--cms-color-primary) !important; border: 1px solid var(--cms-color-primary) !important; }
@media (hover: hover) { .backend-page .btn-outline-custom:hover { background: rgba(var(--cms-color-primary-rgb), .05) !important; color: var(--cms-color-primary-hover) !important; border-color: var(--cms-color-primary-hover) !important; } }
.backend-page .btn-tertiary { background: none; font-size: .9rem; color: var(--cms-color-muted); text-decoration: underline; text-underline-offset: 4px; }

/* The cards of /document (« Demande de Lien Sécurisé ») and /upload (« Espace de dépôt de document »): white, the
   team's choice (live, they let the page's blue through). */
.backend-page .portal-container, .backend-page .upload-container { background: #fff; }

/* The bot check (Cloudflare Turnstile), shown only when it needs the visitor. */
.backend-page .human-check { display: flex; justify-content: center; }
.backend-page .human-check:has(iframe) { margin-top: 1rem; }

/* The success card (paiement, and /code's last step), as live. */
.backend-page .success-page { display: flex; justify-content: center; align-items: center; width: 100%; min-height: calc(100vh - 220px); padding: 3rem 1rem; }
.backend-page .success-card {
  width: 100%; max-width: 540px; margin: 0 auto; border-radius: 32px; border: 1px solid rgba(var(--cms-color-primary-rgb), .1);
  background-color: var(--color-background-card); padding: 2.5rem 3rem; box-shadow: 0 24px 70px rgba(var(--cms-color-primary-rgb), .08);
}
.backend-page .success-step { text-align: center; }
.backend-page .success-check {
  width: 44px; height: 44px; margin: .5rem auto 1.1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.backend-page .success-step .success-title { margin: 0; font-size: 2.3rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--title-color); text-wrap: balance; }
.backend-page .success-step .success-thanks, .backend-page .success-step .success-mail, .backend-page .success-step .step-subtitle {
  max-width: 420px !important; margin: .5rem auto 0 !important; font-size: 1rem; line-height: 1.6; color: #5b6b7b;
}
.backend-page .success-step .success-thanks { margin-top: 1rem !important; font-size: 1.08rem; }
.backend-page .success-step strong { color: #334155; font-weight: 500; }
.backend-page .success-step a.success-btn { width: auto !important; margin-top: 2rem; padding-left: 2.4rem !important; padding-right: 2.4rem !important; text-decoration: none; }
.backend-page .success-step .success-countdown { margin: 1rem auto 0; text-wrap: balance; font-size: .92rem; color: #7a8794; }
.backend-page .success-step .success-countdown b { font-weight: 600; color: #334155; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .backend-page .success-page { padding: 1.5rem 1rem; }
  .backend-page .success-card { padding: 2rem 1.25rem; }
  .backend-page .success-step .success-title { font-size: 2rem; }
}

/* The turning wheel of the buttons while a request is on its way (code.css and document.css use it). */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* The design review's fixes (2026-11-18, findings 9, 13, 27, 28, 29): the three form cards (Code, Document, Upload)
   and the success card (Paiement, the end of Code) are the rest of the site's card, at the same distance under the
   header as every page; one field shape, round as the buttons; the site's own button. Only the look changes: the
   markup and the scripts stay the live pages'. These rules come last and beat the live files' (some with !important,
   as the live files use it, or the titles' inline sizes). */
.backend-page .activation-page { min-height: 0; justify-content: flex-start; padding: var(--top) var(--pad) var(--space); }
.backend-page .page-content { padding: var(--top) var(--pad) var(--space); }
.backend-page .success-page { min-height: 0; align-items: flex-start; padding: 0; }
.backend-page .activation-card, .backend-page .portal-container, .backend-page .upload-container, .backend-page .success-card {
  width: 100%; max-width: 520px; margin: 0 auto; padding: 40px; background: #fff;
  border: var(--card-border); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
/* One title size for the cards. */
.backend-page .activation-title, .backend-page .portal-container h1, .backend-page .upload-container h1,
.backend-page .success-step .success-title { font-size: 1.75rem !important; line-height: 1.2; letter-spacing: -0.02em; }
/* The fields: round, as tall as the buttons. */
.backend-page .input-field, .backend-page .standard-input-field, .backend-page .code-input-field {
  min-height: 52px; height: auto; border-radius: 999px; border-color: #cbd5e1; font-size: 1rem;
}
.backend-page .input-field { padding: .8rem 1.25rem; }
/* The site's button: 52 px tall, 1rem text, a full pill. */
.backend-page .btn, .backend-page .btn-primary, .backend-page .activation-card .btn {
  min-height: 52px; height: auto !important; padding: 12px 24px !important; border-radius: 999px;
  font-size: 1rem !important; font-weight: 500 !important; line-height: 1.3;
}
.backend-page .activation-card .btn { white-space: normal !important; }
/* No text under 14 px (finding 12). */
.backend-page .activation-badge, .backend-page .field-note, .backend-page .step-text { font-size: var(--small); }
/* Phone: the site's 16 px edge, less room inside the card, so the fields and buttons keep their width (findings 9,
   27, 29). */
@media (max-width: 640px) {
  .backend-page .activation-card, .backend-page .portal-container, .backend-page .upload-container, .backend-page .success-card { padding: 28px 20px; }
  .backend-page .btn, .backend-page .btn-primary, .backend-page .activation-card .btn { padding-left: 14px !important; padding-right: 14px !important; }
}

/* Paiement: the confirmation on the page itself, no card behind it (team, 2026-11-19). The end of /code keeps its card,
   the wizard's. */
.backend-page .success-page .success-card { background: none; border: 0; box-shadow: none; }
