/* Tokens issus de la charte : marine, bleu des liens, rouge du logo, vert de l'action de paiement. */
.lrl {
  --lrl-navy: #0b1e2c;
  --lrl-navy-2: #14344c;
  --lrl-ink: #10263a;
  --lrl-muted: #566a7c;
  --lrl-line: #dde4ea;
  --lrl-surface: #ffffff;
  --lrl-bg: #f3f5f7;
  --lrl-blue: #1f6fd6;
  --lrl-blue-dark: #1558ad;
  --lrl-red: #b3271f;
  --lrl-yellow: #ffd500;
  --lrl-green: #1b8f33;
  --lrl-green-dark: #14742a;
  --lrl-radius: 16px;
  --lrl-shadow: 0 12px 32px -18px rgba(11, 30, 44, .45);

  background: var(--lrl-bg);
  color: var(--lrl-ink);
  font-size: 16px;
  line-height: 1.55;
  min-height: 70vh;
  padding-bottom: 64px;
}
.lrl *, .lrl *::before, .lrl *::after { box-sizing: border-box; }
.lrl h1, .lrl h2, .lrl h3 { color: inherit; font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
.lrl h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.lrl h2 { font-size: 1.3rem; }
.lrl h3 { font-size: 1rem; margin: 0; }
.lrl p { margin: 0 0 1em; }
.lrl a { color: var(--lrl-blue); }
.lrl [hidden] { display: none !important; }

.lrl-wrap { margin: 0 auto; max-width: 1080px; padding: 0 20px; }
.lrl-narrow { max-width: 620px; margin-top: 28px; }
.lrl-spaced { margin-top: 28px; }
.lrl-center { text-align: center; }
.lrl-muted { color: var(--lrl-muted); }
.lrl-small { color: var(--lrl-muted); font-size: .875rem; }
.lrl-sr { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.lrl-hp { height: 0; left: -9999px; overflow: hidden; position: absolute; width: 0; }

/* En-tête */
.lrl-hero { background: linear-gradient(120deg, var(--lrl-navy), var(--lrl-navy-2)); color: #fff; padding: 36px 0 44px; }
.lrl-hero p { color: #d5e0e9; font-size: 1.05rem; margin: 0; max-width: 60ch; }
.lrl-hero--compact { padding: 26px 0 24px; }
.lrl-hero--compact h1 { margin: 0; }
.lrl-account-head { align-items: center; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-bottom: 22px; }
.lrl-account-head form { margin: 0; }

.lrl .lrl-steps { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0 0 22px; padding: 0; }
.lrl-steps li { align-items: center; color: #9db2c3; display: flex; font-size: .875rem; gap: 8px; margin: 0; }
.lrl-steps__dot { align-items: center; border: 1px solid #5c7a91; border-radius: 50%; display: inline-flex; font-size: .75rem; height: 24px; justify-content: center; width: 24px; }
.lrl-steps .is-done .lrl-steps__dot { background: #5c7a91; color: #fff; }
.lrl-steps .is-current { color: #fff; font-weight: 600; }
.lrl-steps .is-current .lrl-steps__dot { background: var(--lrl-yellow); border-color: var(--lrl-yellow); color: var(--lrl-navy); font-weight: 700; }

.lrl-hero:has(.lrl-tabs) { padding-bottom: 0; }
.lrl-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.lrl .lrl-tabs a { border-radius: 10px 10px 0 0; color: #d5e0e9; flex-shrink: 0; font-weight: 600; padding: 10px 16px; text-decoration: none !important; white-space: nowrap; }
.lrl .lrl-tabs a:hover { color: #fff; }
.lrl .lrl-tabs a.is-active { background: var(--lrl-bg); color: var(--lrl-ink); }

/* Cartes */
.lrl-card { background: var(--lrl-surface); border: 1px solid var(--lrl-line); border-radius: var(--lrl-radius); box-shadow: var(--lrl-shadow); margin-bottom: 18px; padding: 26px; position: relative; }
.lrl-card > :last-child { margin-bottom: 0; }
.lrl-narrow-card { max-width: 620px; }
.lrl-auth { margin-top: 44px; max-width: 480px; }
.lrl-empty { padding: 48px 26px; text-align: center; }

/* Offre */
.lrl-offer { display: grid; gap: 32px; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); margin-top: -22px; }
.lrl .lrl-price-card { align-self: start; padding: 32px; }
.lrl-price-card__head { align-items: center; display: flex; gap: 16px; }
.lrl .lrl-price-card__head img { border-radius: 16px; flex-shrink: 0; height: 88px; object-fit: cover; width: 88px; }
.lrl .lrl-price-card__head h2 { margin-bottom: 6px; }
.lrl .lrl-price-card__head p { font-size: .95rem; line-height: 1.4; margin: 0; }
/* Sélecteurs à deux niveaux : « .lrl p » écraserait sinon ces marges. */
.lrl .lrl-price-card .lrl-btn { margin-top: 28px; }
.lrl .lrl-price-card .lrl-reassure { margin: 22px 0 0; text-wrap: balance; }
.lrl-badge { background: var(--lrl-red); border-radius: 999px; color: #fff; font-size: .8rem; font-weight: 600; padding: 4px 12px; position: absolute; right: 16px; top: -12px; }
.lrl .lrl-price { align-items: baseline; display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 28px 0 8px; }
.lrl-price s { color: var(--lrl-muted); font-size: 1.1rem; }
.lrl-price strong { font-size: 2.6rem; line-height: 1; }
.lrl-price span { color: var(--lrl-muted); font-size: .9rem; }
.lrl-benefits { padding-top: 48px; }
.lrl .lrl-checks { list-style: none; margin: 0 0 18px; padding: 0; }
.lrl-checks li { margin: 0 0 10px; padding-left: 28px; position: relative; }
.lrl-checks li::before { color: var(--lrl-green); content: "✓"; font-weight: 700; left: 4px; position: absolute; }

/* Récapitulatif */
.lrl-line { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.lrl-line p { margin: 2px 0 0; }
.lrl-line--discount { color: var(--lrl-green-dark); font-weight: 600; margin-top: 14px; }
.lrl-totals { border-top: 1px solid var(--lrl-line); margin: 18px 0 14px; padding-top: 12px; }
.lrl-totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.lrl-totals dt, .lrl-totals dd { font-weight: 400; margin: 0; }
.lrl-totals__grand { border-top: 1px solid var(--lrl-line); font-size: 1.15rem; margin-top: 8px; padding-top: 10px !important; }
.lrl-totals__grand:first-child { border-top: 0; margin-top: 0; padding-top: 3px !important; }
.lrl-totals__grand dt, .lrl-totals__grand dd { font-weight: 700; }
.lrl-inline { display: inline; margin-left: 8px; }
.lrl-code { padding: 16px 26px; }
.lrl-code summary { cursor: pointer; font-weight: 600; }
.lrl-code summary::marker { color: var(--lrl-muted); }

/* CGV */
.lrl-legal { margin: 0 auto; max-width: 780px; padding: 36px; }
.lrl .lrl-legal h2 { font-size: 1.1rem; margin: 1.8em 0 .5em; }
.lrl .lrl-legal p + h2 { margin-top: 1.8em; }
.lrl-todo { background: #fdf2d3; border-radius: 4px; color: #6d5200; padding: 1px 5px; }
.lrl .lrl-code__form { align-items: stretch; display: flex; gap: 10px; margin-top: 14px; }
.lrl .lrl-code__form input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; width: auto; }
.lrl .lrl-code__form .lrl-btn { flex: 0 0 auto; width: auto; }
.lrl-pay-total { align-items: baseline; display: flex; font-size: 1.05rem; justify-content: space-between; }
.lrl-pay-total strong { font-size: 1.4rem; }
.lrl-stripe { margin-bottom: 18px; min-height: 120px; }
#lrl-pay + .lrl-small { margin: 12px 0 6px; }

/* Formulaires */
.lrl-form { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.lrl-card.lrl-form { margin-top: 0; }
.lrl-field label, .lrl-search label { display: block; font-weight: 600; margin-bottom: 6px; }
.lrl input[type=text], .lrl input[type=email], .lrl input[type=password], .lrl input[type=search] {
  background: #fff; border: 1px solid #b6c3ce; border-radius: 10px; color: var(--lrl-ink); font: inherit; min-height: 46px; padding: 10px 12px; width: 100%;
}
.lrl input:focus-visible, .lrl button:focus-visible, .lrl a:focus-visible, .lrl summary:focus-visible { outline: 3px solid rgba(31, 111, 214, .45); outline-offset: 2px; }
.lrl input:disabled { background: var(--lrl-bg); color: var(--lrl-muted); }
.lrl-field .lrl-small { margin: 6px 0 0; }
.lrl-password { position: relative; }
.lrl-password input { padding-right: 84px !important; }
.lrl-password .lrl-link { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.lrl-check { align-items: flex-start; cursor: pointer; display: flex; font-size: .95rem; gap: 10px; }
.lrl-check input { flex-shrink: 0; height: 18px; margin-top: 3px; width: 18px; }
.lrl-fieldset { border: 1px solid var(--lrl-line); border-radius: 12px; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 16px; }
.lrl-fieldset legend { font-weight: 600; padding: 0 6px; }
.lrl-links { display: flex; flex-wrap: wrap; font-size: .95rem; gap: 8px 18px; justify-content: space-between; margin: 18px 0 0; }
.lrl-back { display: block; font-size: .95rem; margin-top: 4px; text-align: center; }
.lrl-stack { margin: 0 0 12px; }

/* Boutons : spécificité renforcée pour passer devant les styles du thème. */
.lrl .lrl-btn {
  align-items: center; border: 1px solid transparent; border-radius: 12px; box-shadow: none; cursor: pointer; display: inline-flex; font: inherit; font-weight: 700; justify-content: center; min-height: 48px; padding: 10px 22px; text-align: center; text-decoration: none !important; transition: background-color .15s, border-color .15s; width: 100%;
}
.lrl .lrl-btn--primary { background: var(--lrl-blue); color: #fff; }
.lrl .lrl-btn--primary:hover { background: var(--lrl-blue-dark); color: #fff; }
.lrl .lrl-btn--pay { background: var(--lrl-green); color: #fff; }
.lrl .lrl-btn--pay:hover { background: var(--lrl-green-dark); color: #fff; }
.lrl .lrl-btn--ghost { background: #fff; border-color: #b6c3ce; color: var(--lrl-ink); }
.lrl .lrl-btn--ghost:hover { background: var(--lrl-bg); color: var(--lrl-ink); }
.lrl .lrl-btn--light { background: transparent; border-color: rgba(255, 255, 255, .5); color: #fff; font-weight: 600; min-height: 40px; width: auto; }
.lrl .lrl-btn--light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.lrl .lrl-btn--danger { background: #fff; border-color: var(--lrl-red); color: var(--lrl-red); }
.lrl .lrl-btn--danger:hover { background: var(--lrl-red); color: #fff; }
.lrl .lrl-btn--small { font-size: .875rem; min-height: 38px; padding: 6px 14px; width: auto; }
.lrl .lrl-btn[disabled] { cursor: not-allowed; opacity: .55; }
.lrl .lrl-btn.is-loading { cursor: progress; opacity: .8; pointer-events: none; }
.lrl .lrl-btn.is-loading::before { animation: lrl-spin .7s linear infinite; border: 2px solid currentColor; border-radius: 50%; border-right-color: transparent; content: ""; flex-shrink: 0; height: 16px; margin-right: 10px; width: 16px; }

/* Indicateur de chargement */
.lrl-spinner { animation: lrl-spin .7s linear infinite; border: 2px solid currentColor; border-radius: 50%; border-right-color: transparent; display: inline-block; flex-shrink: 0; height: 16px; width: 16px; }
.lrl-spinner--large { border-width: 3px; color: var(--lrl-blue); height: 40px; width: 40px; }
.lrl-alert--busy { align-items: center; display: flex; gap: 10px; }
/* Plein écran : le formulaire Stripe peut dépasser la hauteur de la fenêtre. */
.lrl-paying { align-items: center; background: rgba(255, 255, 255, .94); display: flex; flex-direction: column; gap: 10px; inset: 0; justify-content: center; padding: 24px; position: fixed; text-align: center; z-index: 99999; }
.lrl-paying strong { font-size: 1.1rem; }
@keyframes lrl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .lrl-spinner, .lrl .lrl-btn.is-loading::before { animation-duration: 2.5s; }
}
.lrl .lrl-link { background: none; border: 0; box-shadow: none; color: var(--lrl-blue); cursor: pointer; font: inherit; font-size: .875rem; font-weight: 600; min-height: 0; padding: 0; text-decoration: underline; }

/* Messages */
.lrl-alert { border-radius: 12px; font-size: .95rem; margin: 0 0 16px; padding: 12px 14px; }
.lrl-alert p { margin: 0; }
.lrl-alert p + p { margin-top: 4px; }
.lrl-alert--ok { background: #e4f5e8; color: #14622a; }
.lrl-alert--error { background: #fbe9e7; color: #8f1f19; }
.lrl-alert--info { background: #e6f0fb; color: #164f8f; }
.lrl-status { border-radius: 999px; font-size: .8rem; font-weight: 700; margin-right: 6px; padding: 3px 10px; }
.lrl-status--ok { background: #e4f5e8; color: #14622a; }
.lrl-status--warn { background: #fdf2d3; color: #7a5a00; }
.lrl-status--off { background: #e9edf0; color: var(--lrl-muted); }
.lrl-cancel { border-top: 1px solid var(--lrl-line); margin-top: 18px; padding-top: 14px; }
.lrl-cancel summary { color: var(--lrl-muted); cursor: pointer; font-weight: 600; }
.lrl-cancel p { margin: 12px 0; }
.lrl-cancel--plain { border-top: 0; margin-top: 0; padding-top: 0; }

/* Bibliothèque */
.lrl-search { background: var(--lrl-surface); border: 1px solid var(--lrl-line); border-radius: var(--lrl-radius); box-shadow: var(--lrl-shadow); margin-bottom: 14px; padding: 18px 20px; }
.lrl-search input { font-size: 1.05rem; }
.lrl-search .lrl-small { margin: 8px 0 0; }
.lrl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.lrl .lrl-chip { background: #fff; border: 1px solid #c6d1da; border-radius: 999px; box-shadow: none; color: var(--lrl-ink); cursor: pointer; font: inherit; font-size: .875rem; font-weight: 500; line-height: 1.3; min-height: 36px; padding: 6px 14px; }
.lrl .lrl-chip:hover { background: var(--lrl-bg); color: var(--lrl-ink); }
.lrl .lrl-chip.is-active, .lrl .lrl-chip.is-active:hover { background: var(--lrl-navy); border-color: var(--lrl-navy); color: #fff; }
.lrl-theme { margin-bottom: 30px; }
.lrl-theme > h2 { align-items: center; display: flex; gap: 10px; }
.lrl-theme > h2 span { background: #e2e8ed; border-radius: 999px; color: var(--lrl-muted); font-size: .8rem; font-weight: 600; padding: 2px 9px; }
.lrl-letters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.lrl-letter { background: var(--lrl-surface); border: 1px solid var(--lrl-line); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; justify-content: space-between; padding: 16px; transition: border-color .15s, box-shadow .15s; }
.lrl-letter:hover { border-color: #aebdca; box-shadow: var(--lrl-shadow); }
.lrl-letter__body p { margin: 6px 0 0; }
.lrl-letter__actions { display: flex; gap: 8px; }
.lrl-code-pill { background: #fdf2d3; border-radius: 6px; color: #6d5200; display: inline-block; font-size: .75rem; font-variant-numeric: tabular-nums; font-weight: 700; margin-bottom: 6px; padding: 2px 7px; }

/* Factures */
.lrl .lrl-invoices { list-style: none; margin: 0; padding: 0; }
.lrl-invoices li { align-items: center; border-top: 1px solid var(--lrl-line); display: flex; gap: 12px; justify-content: space-between; margin: 0; padding: 14px 0; }
.lrl-invoices li:first-child { border-top: 0; }
.lrl-invoices p { margin: 2px 0 0; }
.lrl-invoices__credit { padding-left: 18px !important; }

@media (max-width: 760px) {
  .lrl-offer { grid-template-columns: minmax(0, 1fr); }
  .lrl-benefits { padding-top: 0; }
  .lrl-card { padding: 20px; }
  .lrl-steps__label { display: none; }
  .lrl-steps .is-current .lrl-steps__label { display: inline; }
  .lrl .lrl-code__form { flex-direction: column; }
  .lrl .lrl-code__form .lrl-btn { width: 100%; }
  .lrl-legal { padding: 20px; }
  /* Filtres sur une seule ligne défilante : la liste reste visible sans long défilement. */
  .lrl-chips { flex-wrap: nowrap; margin: 0 -20px 22px; overflow-x: auto; padding: 0 20px 4px; scrollbar-width: none; }
  .lrl .lrl-chip { flex-shrink: 0; }
}
