/* Noël Morissette — feuille de style unique. Valeurs tirées du fichier Figma « Brand identity ». Voir BRAND.md. */

:root {
  --bg: #131b23;          /* fond des diapositives Figma */
  --surface: #1a242e;
  --field: #18212b;
  --text: #ffffff;
  --text-soft: #e5e5e5;   /* couleur du nom sous le monogramme */
  --muted: #9aa6b2;
  --rule: #2a3642;
  --accent: #9dacff;      /* lavande « Dans l'église locale » */
  --glow-a: #ff6622;
  --glow-b: #6842ff;
  --error: #ff9b8a;

  --display: "Dela Gothic One", "Arial Black", sans-serif;
  /* Gotham dans Figma ; Montserrat est l'équivalent libre le plus proche. */
  --sans: "Montserrat", "Gotham", "Helvetica Neue", Arial, sans-serif;

  --measure: 36rem;
  --wide: 68rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

html, body { overflow-x: clip; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: -999px; z-index: 2; }
.skip:focus { left: var(--gutter); top: 0.5rem; background: var(--bg); padding: 0.25rem 0.5rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); position: relative; }

strong, b { font-weight: 500; }

/* En-tête */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.wordmark { display: block; line-height: 0; }
.wordmark img { width: 4.5rem; height: auto; }
.wordmark:hover { opacity: 0.85; }

.site-nav { display: flex; gap: 1.75rem; font-size: 0.875rem; font-weight: 400; }
.site-nav a { text-decoration: none; color: var(--text-soft); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); }
.cart-link [data-cart-count]:not(:empty)::before { content: "("; }
.cart-link [data-cart-count]:not(:empty)::after { content: ")"; }

@media (max-width: 40rem) {
  .site-nav { gap: 1.25rem; }
  .site-nav .opt { display: none; }
}

/* Typographie */

h1, h2, h3 { font-weight: 400; line-height: 1.1; margin: 0; }

.display {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.06em;   /* -6,48 px sur 108 px dans Figma */
  line-height: 0.95;
}

.kicker {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.5rem;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }
.todo { background: rgba(157, 172, 255, 0.16); color: var(--accent); padding: 0 0.25em; border-radius: 2px; }

/* Accueil : reprise de la diapositive « Évangélisation » */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(3rem, 9vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem);
}

/* Halo orange → violet du fichier Figma, en bas à gauche. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -18rem;
  bottom: -14rem;
  width: min(44rem, 140vw);
  height: min(42rem, 134vw);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--glow-a), var(--glow-b));
  filter: blur(120px);
  opacity: 0.42;
  pointer-events: none;
}

.hero h1 {
  /* Le mot tient toujours sur une ligne (≈ 11,3 em de large). */
  font-size: min(5.25rem, calc((100vw - 2 * var(--gutter)) / 12));
  white-space: nowrap;
  margin: 0;
}

.echo {
  margin: 0.6rem 0 0;
  font-size: clamp(1.4rem, 4.2vw, 3.1rem);
  font-weight: 300;
  letter-spacing: -0.02em;   /* -1,34 px sur 67 px */
  line-height: 1.15;
  color: var(--accent);
}
.echo span { display: block; }
.echo span:nth-child(2) { padding-left: 1.6em; opacity: 0.6; }
.echo span:nth-child(3) { padding-left: 3em; opacity: 0.3; }
.echo span:nth-child(4) { padding-left: 4.6em; opacity: 0.1; }

.hero .prose { margin-top: clamp(2.5rem, 6vw, 4rem); color: var(--text-soft); font-size: 1.125rem; }

/* Sections */

.section {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1rem 3rem;
  padding: 4rem 0;
  border-top: 1px solid var(--rule);
}

.section > h2 {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--text);
  padding-top: 0.2rem;
}

@media (max-width: 46rem) {
  .section { grid-template-columns: 1fr; padding: 2.75rem 0; }
}

/* Livres */

.books { list-style: none; margin: 0; padding: 0; }

.book {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 2rem;
  padding: 0 0 2.75rem;
}
.book + .book { padding-top: 2.75rem; border-top: 1px solid var(--rule); }
.book:last-child { padding-bottom: 0; }

.book img {
  width: 100%;
  height: auto;
  align-self: start;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--surface);
}

.book h3 { font-size: 1.4rem; font-weight: 400; letter-spacing: -0.01em; }
.book .sub { margin: 0.25rem 0 0; color: var(--muted); }
.book .meta { font-size: 0.8125rem; color: var(--muted); margin: 0.6rem 0 0; }
.book .blurb { margin: 0.9rem 0 0; max-width: var(--measure); color: var(--text-soft); }

.buy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.4rem;
  font-size: 0.9375rem;
}
.price { font-weight: 500; font-variant-numeric: tabular-nums; }

@media (max-width: 30rem) {
  .book { grid-template-columns: 5.5rem 1fr; gap: 1.1rem; }
  .book h3 { font-size: 1.2rem; }
}

/* Boutons et champs */

.btn {
  appearance: none;
  display: inline-block;
  border: 1px solid var(--text);
  background: transparent;
  color: var(--text);
  font: 500 0.9375rem/1 var(--sans);
  padding: 0.85rem 1.2rem;
  min-height: 2.75rem;
  border-radius: 6px;        /* coins arrondis du monogramme */
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn[disabled] { opacity: 0.5; cursor: progress; }

.btn-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.btn-link:hover { color: var(--accent); }

.added { color: var(--muted); font-size: 0.875rem; }

.field { display: grid; gap: 0.4rem; margin: 0 0 1.1rem; }
.field label { font-size: 0.8125rem; font-weight: 400; color: var(--text-soft); }
.opt-label { color: var(--muted); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 2.9rem;
  font: 400 1rem/1.4 var(--sans);
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
  color-scheme: dark;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }
textarea { min-height: 6rem; resize: vertical; }

.field[data-invalid] input, .field[data-invalid] select { border-color: var(--error); }
.field-error { font-size: 0.8125rem; color: var(--error); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 1rem; }
@media (max-width: 34rem) {
  .row, .row-3 { grid-template-columns: 1fr; }
}

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 6px;
}
.qty button {
  appearance: none;
  border: 0;
  background: none;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
}
.qty button:hover { color: var(--accent); }
.qty output { min-width: 1.75rem; text-align: center; font-variant-numeric: tabular-nums; }

/* Commande */

.page-title { padding: 2.5rem 0 2.25rem; }
.page-title h1 { font-size: clamp(2rem, 5vw, 3.4rem); }

.checkout {
  display: grid;
  grid-template-columns: 1fr 20rem;
  gap: 3.5rem;
  align-items: start;
  padding-bottom: 5rem;
}
@media (max-width: 52rem) {
  .checkout { grid-template-columns: 1fr; gap: 2rem; }
  .summary { order: -1; }
}

.checkout fieldset { border: 0; padding: 0; margin: 0 0 2.5rem; min-width: 0; }
.checkout legend { font-size: 1.25rem; font-weight: 400; padding: 0; margin: 0 0 1.25rem; }
.legend-opt { font-size: 0.9375rem; color: var(--muted); }

.summary {
  background: var(--surface);
  border-radius: 6px;
  padding: 1.5rem;
  font-size: 0.9375rem;
}
.summary h2 { font-family: var(--display); font-size: 1rem; text-transform: uppercase; margin: 0 0 0.5rem; }
@media (min-width: 52.01rem) {
  .summary { position: sticky; top: 1.5rem; }
}

.lines { list-style: none; margin: 0; padding: 0; }
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}
.line .t { font-weight: 400; }
.line .controls { display: flex; align-items: center; gap: 0.9rem; font-size: 0.8125rem; }
.line .amt { text-align: right; font-variant-numeric: tabular-nums; }

.totals { margin: 0.75rem 0 0; display: grid; grid-template-columns: 1fr auto; gap: 0.45rem 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; padding-left: 1rem; text-align: right; font-variant-numeric: tabular-nums; }
.totals .grand { color: var(--text); font-weight: 500; padding-top: 0.7rem; border-top: 1px solid var(--rule); }

.pay-note { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.55; max-width: 30rem; }
.ship-note { margin: 0; font-size: 0.875rem; color: var(--muted); }

.form-error {
  font-size: 0.9375rem;
  color: var(--error);
  border-left: 2px solid var(--error);
  padding: 0.2rem 0 0.2rem 0.75rem;
  margin: 0 0 1.5rem;
}

.empty { padding: 1rem 0 5rem; }

/* Confirmation */

.confirm { padding: 1rem 0 5rem; max-width: 40rem; }
.confirm .order-id { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.08em; color: var(--accent); margin: 0 0 0.75rem; }
.confirm h1 { font-family: var(--display); text-transform: uppercase; letter-spacing: -0.04em; font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 1.25rem; }
.confirm .kicker { margin: 3rem 0 0.5rem; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 2.5rem 0 0; }
.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  padding: 1.3rem 0;
  border-top: 1px solid var(--rule);
}
.steps li::before { content: counter(s, decimal-leading-zero); color: var(--accent); font-weight: 500; font-size: 0.875rem; padding-top: 0.15rem; }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps p { margin: 0 0 0.4rem; color: var(--text-soft); }

.copyable { display: inline-flex; align-items: baseline; gap: 0.85rem; flex-wrap: wrap; }
.copyable strong { font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.copyable .btn-link { font-size: 0.8125rem; }

/* Pied de page */

.site-foot {
  background: linear-gradient(var(--rule), var(--rule)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  padding-top: 1.75rem;
  padding-bottom: 2.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: var(--muted);
}
.site-foot p { margin: 0; }
.site-foot img { width: 11rem; height: auto; opacity: 0.8; }

@media (prefers-reduced-motion: no-preference) {
  a, .btn { transition: color 120ms, background-color 120ms, border-color 120ms; }
}
