/* Palette et proportions de la capture de référence. */
:root {
  color-scheme: light;
  --page: #f4f7fa;
  --section: #eaf0f5;
  --ink: #344153;
  --text: #768391;
  --accent: #aac3d9;
  --border: #e0e7ee;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
h2 { margin: 0 0 48px; font-size: 36px; text-align: center; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #235b89; outline-offset: 6px; }
section[id] { scroll-margin-top: 32px; }
.wide-container { width: min(848px, calc(100% - 48px)); margin-inline: auto; }
.reading-container { width: min(624px, calc(100% - 48px)); margin-inline: auto; }

/* Le fond et le mockup restent les images originales, sans retouche. */
.hero {
  position: relative;
  isolation: isolate;
  padding: 80px 24px 48px;
  color: #fff;
  text-align: center;
  background: #235b89 url("../images/thermalisme.png") center / cover no-repeat;
}
.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(18, 41, 65, .38) 0%, rgba(24, 57, 88, .22) 43%, rgba(225, 234, 244, .66) 76%, var(--page) 100%);
}
.hero-content { max-width: 848px; margin-inline: auto; }
.eyebrow {
  margin-bottom: 24px;
  color: #d4e1ee;
  font-size: 12px;
  letter-spacing: .35em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -.035em;
  text-shadow: 0 2px 14px rgba(23, 48, 74, .12);
}
h1 em { font-weight: 400; }
.book-cover {
  position: relative;
  z-index: 2;
  width: 400px;
  margin: 64px auto 0;
  filter: drop-shadow(0 16px 12px rgba(13, 32, 51, .3));
}
.hero-panel {
  position: relative;
  margin-top: -80px;
  padding: 140px 56px 32px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 14px;
  background: rgba(242, 248, 253, .3);
  box-shadow: 0 6px 14px rgba(44, 69, 97, .18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.hero-panel p { max-width: 680px; margin-inline: auto; font-size: 17px; }
.hero-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 20px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.hero-link:hover { color: #e7f1fa; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 20px;
  padding: 12px 24px;
  border-radius: 999px;
  background: #fff;
  color: #56677a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(44, 69, 97, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(44, 69, 97, .18); }
.arrow { position: relative; width: 7px; height: 11px; border-left: 1px solid; }
.arrow::after { position: absolute; bottom: 0; left: -4px; width: 6px; height: 6px; border-right: 1px solid; border-bottom: 1px solid; content: ""; transform: rotate(45deg); }

/* Les éditions sont informatives tant que les liens d'achat ne sont pas fournis. */
.purchase { padding: 128px 0; }
.purchase h2 { margin-bottom: 56px; }
.purchase-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 24px; align-items: stretch; }
.purchase-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  min-height: 360px;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .45);
  text-align: center;
}
.ebook-card { border-color: #b7cada; background: #fff; box-shadow: 0 14px 34px rgba(44, 69, 97, .12); }
.paper-card { justify-content: center; }
.edition-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 24px; border-radius: 50%; background: #e9eff5; }
.icon-paper { position: relative; display: block; width: 18px; height: 22px; border: 1.5px solid #658bad; border-radius: 2px; background: #fff; }
.icon-paper::after { position: absolute; right: 3px; bottom: 4px; left: 3px; height: 1px; background: #b7cada; box-shadow: 0 -4px #b7cada; content: ""; }
.icon-france { background: linear-gradient(90deg, #003b99 33.333%, #fff 33.333% 66.666%, #ed2939 66.666%); }
.icon-belgique { background: linear-gradient(90deg, #222 33.333%, #fdda24 33.333% 66.666%, #ef3340 66.666%); }
.icon-suisse { width: 20px; height: 20px; position: relative; background: #ed2939; }
.icon-suisse::before, .icon-suisse::after { position: absolute; inset: 4px 8px; background: #fff; content: ""; }
.icon-suisse::after { inset: 8px 4px; }
.icon-ebook { width: 21px; height: 17px; border: 1.5px solid #658bad; border-radius: 2px; background: linear-gradient(90deg, transparent calc(50% - .75px), #658bad calc(50% - .75px) calc(50% + .75px), transparent calc(50% + .75px)); }
.purchase-card h3 { margin: 0 0 8px; font-size: 18px; }
.purchase-card p { font-size: 13px; }
.offer-label { color: #7892aa; font-size: 11px !important; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.offer-description { max-width: 34ch; min-height: 58px; }
.status { margin-top: auto; padding-top: 20px; color: #9babbd; font-size: 11px; font-style: italic; line-height: 1.5; text-transform: uppercase; }

/* Lecture en colonne, comme sur la référence. */
.introduction { padding: 128px 0; background: var(--section); }
.back-cover { padding-top: 128px; }
.section-ornament { display: flex; align-items: center; justify-content: center; gap: 10px; width: 128px; height: 6px; margin: 0 auto 48px; background: radial-gradient(circle at center, var(--accent) 2px, transparent 2.5px); }
.section-ornament::before, .section-ornament::after { width: 52px; height: 1px; background: #d3e0ec; content: ""; }
.reading-text { text-align: justify; }
.reading-text p { margin-bottom: 24px; }
.reading-text p:last-child { margin-bottom: 0; }
.reflection { font-style: italic; }
.signature { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 64px 0; color: var(--accent); font-family: var(--serif); font-size: 14px; font-style: italic; }
.signature::before, .signature::after { width: 72px; height: 1px; background: var(--border); content: ""; }
.author-card { padding: 40px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, .45); }
.author-heading { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 28px; }
.author-photo { flex: 0 0 108px; width: 108px; height: 108px; border-radius: 50%; object-fit: cover; object-position: center 35%; }
.author-heading h2 { margin: 4px 0 6px; font-size: 20px; text-align: left; }
.author-role { color: #9aacc0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.author-text { font-size: 16px; }
.author-text p { margin-bottom: 24px; }
.author-text h3 { margin: 28px 0 16px; font-size: 18px; }
.warning { padding-block: 224px 128px; }
.warning-card { display: flex; align-items: flex-start; gap: 24px; padding: 40px 48px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, .4); }
.warning-icon { display: inline-flex; flex: 0 0 16px; align-items: center; justify-content: center; width: 16px; height: 16px; margin-top: 7px; border: 1px solid var(--accent); border-radius: 50%; color: #83a7c7; font-family: var(--serif); font-size: 12px; }
.warning h2 { margin: 0 0 16px; font-size: 20px; text-align: left; }
.warning p { font-size: 16px; line-height: 1.7; text-align: justify; }
footer { padding: 96px 24px 32px; background: linear-gradient(180deg, var(--page), #387bb8 32%, #659ace 100%); color: #d5e4f1; text-align: center; }
.footer-title { margin-bottom: 16px; font-family: var(--serif); font-size: 18px; font-style: italic; }
.copyright { font-size: 11px; letter-spacing: .04em; }

@media (max-width: 700px) {
  h2 { font-size: 30px; }
  .hero { padding: 56px 24px 32px; }
  h1 { font-size: clamp(38px, 7.8vw, 54px); }
  .eyebrow { font-size: 10px; letter-spacing: .25em; }
  .book-cover { width: 320px; margin-top: 40px; }
  .hero-panel { margin-top: -64px; padding: 96px 24px 28px; }
  .hero-panel p { font-size: 16px; }
  .purchase, .introduction { padding-block: 80px; }
  .purchase-grid { grid-template-columns: 1fr; gap: 16px; }
  .purchase-card { min-height: 0; padding: 28px 20px; }
  .back-cover { padding-top: 80px; }
  .section-ornament { margin-bottom: 36px; }
  .reading-text, .warning p { text-align: left; }
  .author-card { padding: 28px; }
  .author-photo { flex-basis: 80px; width: 80px; height: 80px; }
  .author-heading { align-items: center; gap: 18px; }
  .warning { padding-block: 112px 80px; }
  .warning-card { padding: 28px; gap: 16px; }
}

@media (max-width: 380px) {
  .wide-container, .reading-container { width: calc(100% - 32px); }
  .hero { padding-inline: 16px; }
  .hero-panel { padding-inline: 20px; }
  .purchase-card { padding-inline: 14px; }
  .author-card, .warning-card { padding: 22px; }
  .author-heading { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .button:hover { transform: none; }
}

/* Commande ebook : styles limités à la carte Ebook. */
.ebook-checkout { border: 1px solid var(--border); font-family: inherit; letter-spacing: 0; text-transform: none; cursor: pointer; padding: 10px 12px; }
.ebook-checkout:focus-visible { outline: 3px solid #235b89; outline-offset: 4px; }
.ebook-checkout:disabled { opacity: .6; cursor: wait; transform: none; }
.purchase-card .ebook-test { margin-top: 12px; color: var(--ink); font-size: 11px; }
.purchase-card .checkout-error { margin-top: 8px; color: #8b2525; font-size: 12px; }
.checkout-error:empty { display: none; }

#ebook-form { width: 100%; margin-top: 20px; }
#ebook-form label { display: block; color: var(--ink); font-size: 13px; }
#ebook-email { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 14px; }
#ebook-email:focus-visible { outline: 2px solid #235b89; }
#ebook-email-help { margin-top: 8px; }
.legal-consent { display: grid !important; grid-template-columns: 18px 1fr; gap: 10px; margin-top: 16px; color: var(--text) !important; font-size: 12px !important; line-height: 1.45; text-align: left; }
.legal-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #235b89; }
.legal-consent a { color: #235b89; text-underline-offset: 2px; }
.paper-preorder { margin-top: 28px; border: 1px solid var(--border); background: transparent; color: #8c9baa; cursor: not-allowed; }
.paper-preorder:disabled { opacity: 1; }

.payment-return { padding-block: 64px; }
.payment-return h1 { color: var(--ink); font-size: 32px; text-shadow: none; margin-bottom: 24px; }
.payment-return p { margin-bottom: 20px; }
.payment-return [hidden] { display: none; }

.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 0 auto 18px; font-size: 12px; }
.footer-links a { text-underline-offset: 3px; }

.legal-header { padding: 56px 24px 64px; background: linear-gradient(150deg, #235b89, #659ace); color: #eaf2f8; }
.legal-header .reading-container { width: min(760px, calc(100% - 16px)); }
.legal-header .back-link { display: inline-block; margin-bottom: 48px; color: #fff; font-size: 14px; text-decoration: none; }
.legal-header .eyebrow { margin-bottom: 16px; }
.legal-header h1 { margin-bottom: 20px; font-size: clamp(38px, 7vw, 58px); }
.legal-header p:last-child { max-width: 58ch; }
.legal-main { width: min(760px, calc(100% - 48px)); padding-block: 64px 96px; }
.legal-summary { margin-bottom: 72px; padding: 28px 32px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, .55); }
.legal-summary h2 { margin-bottom: 20px; font-size: 24px; text-align: left; }
.legal-summary ol { margin: 0; padding-left: 22px; }
.legal-summary li + li { margin-top: 8px; }
.legal-summary a, .legal-section a { color: #235b89; text-underline-offset: 3px; }
.legal-section { padding-top: 48px; scroll-margin-top: 16px; }
.legal-section + .legal-section { margin-top: 48px; border-top: 1px solid var(--border); }
.legal-section h2 { margin-bottom: 36px; text-align: left; }
.legal-section h3 { margin: 36px 0 14px; font-size: 21px; }
.legal-section h4 { margin: 26px 0 12px; color: var(--ink); font-family: var(--serif); font-size: 18px; font-weight: 400; }
.legal-section p, .legal-section li { font-size: 16px; line-height: 1.75; }
.legal-section p + p { margin-top: 16px; }
.legal-section ul { margin: 14px 0 0; padding-left: 24px; }
.legal-section li + li { margin-top: 8px; }
.legal-version { color: #63768a; font-style: italic; }
.withdrawal-template { margin-top: 20px; padding: 24px; border-left: 3px solid var(--accent); background: rgba(255, 255, 255, .55); }

@media (max-width: 700px) {
  .legal-header { padding: 36px 8px 48px; }
  .legal-header .back-link { margin-bottom: 36px; }
  .legal-main { padding-block: 40px 72px; }
  .legal-summary { margin-bottom: 48px; padding: 24px; }
  .legal-section { padding-top: 32px; }
  .legal-section + .legal-section { margin-top: 32px; }
}
