/*
Theme Name: Custom
Theme URI: https://www.jbpratt.com
Author: Jean-Baptiste Pratt
Description: « Nuit et lanterne » — thème de jbpratt.com (direction B).
Version: 0.1.0
Requires PHP: 8.0
Text Domain: custom
*/

:root {
  --bg: #0E1620;
  --surface: #16222F;
  --surface-2: #1C2E42;
  --line: #34506F;
  --text: #E6EBF0;
  --muted: #C5CEDA;
  --accent: #F2B34A;
  --accent-hover: #FFC864;
  --font-display: 'Big Shoulders Display', sans-serif;
  --font-body: 'Inter Tight', system-ui, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --wrap: 1200px;
  --gutter: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.5; }
img, video, iframe { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--bg); padding: 12px 20px; font-weight: 600; z-index: 100; }
.skip-link:focus { left: 8px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); width: 100%; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.site { position: relative; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; }
.site-title { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: .08em; text-transform: uppercase; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 500; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--accent); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a { border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* On the front page the header floats over the hero artwork. */
.is-front .site-header { position: absolute; inset: 0 0 auto 0; z-index: 2; border-bottom: 0; }

/* ---------- Buttons / small type ---------- */
.eyebrow { margin: 0; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.btn { display: inline-block; background: var(--accent); color: var(--bg); padding: 16px 30px; font-weight: 600; font-size: 16px; border-radius: 999px; }
.btn:hover { background: var(--accent-hover); }
.link-underline { display: inline-block; font-weight: 600; padding: 16px 8px; border-bottom: 2px solid var(--accent); }
.link-accent { font-weight: 600; color: var(--accent); }
.display { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; margin: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 760px; display: flex; flex-direction: column;
  background: radial-gradient(ellipse 60% 55% at 78% 62%, #1C2E42 0%, #0E1620 70%); }
.hero__sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__body { position: relative; display: flex; flex-direction: column; gap: 28px; flex: 1; justify-content: center; padding-top: 170px; padding-bottom: 120px; }
.hero__eyebrow { font-size: 14px; }
.hero__title { font-size: clamp(72px, 13vw, 168px); line-height: .88; letter-spacing: -.005em; max-width: 9em; }
.hero__lede { margin: 0; font-size: 22px; line-height: 1.5; max-width: 30em; color: var(--muted); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding-top: 8px; }

/* ---------- Sections ---------- */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 56px; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.cover { justify-self: center; width: 280px; max-width: 100%; border: 1px solid var(--line); background: var(--surface-2); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.cover img { display: block; width: 100%; height: auto; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.section-title { font-size: 56px; line-height: 1; }
.prose-lg { margin: 0; font-size: 19px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.book-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.book-list li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.book-list b { font-weight: 600; }
.book-list span:last-child { color: var(--muted); }
.book-list .is-available span:last-child, 
.band { background: var(--surface); }
.pullquote p { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 44px; line-height: 1.1; text-wrap: balance; }
.pullquote footer { color: var(--muted); font-size: 15px; }
.author h2 { margin: 0; font-size: 32px; font-weight: 600; }
.author p { margin: 0; font-size: 18px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }

.orbit { padding-top: 96px; padding-bottom: 72px; }
.orbit__head { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: baseline; margin-bottom: 32px; }
.orbit__head h2 { font-size: 40px; }
.orbit__head span { color: var(--muted); font-size: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: 4px; }
.card:hover { border-color: var(--accent); }
.card__meta { font-size: 13px; color: var(--muted); }
.card__title { font-size: 22px; font-weight: 600; line-height: 1.25; }
.card--featured { grid-column: 1 / -1; gap: 16px; padding: 40px; border-color: var(--accent); }
.card--featured .card__meta { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.card--featured .card__title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 500; line-height: 1.3; max-width: 24em; text-wrap: balance; }
.card--featured .card__more { color: var(--muted); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; padding-top: 40px; padding-bottom: 40px; font-size: 14px; color: var(--muted); }

/* ---------- Inner pages (posts, pages, archives) ---------- */
.content { max-width: 760px; margin: 0 auto; padding: 72px var(--gutter) 96px; }
.entry-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(40px, 6vw, 72px); line-height: 1; margin: 0 0 16px; }
.entry-meta { color: var(--muted); font-size: 14px; margin-bottom: 40px; }
.entry-content { font-size: 19px; line-height: 1.7; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content h2, .entry-content h3 { font-family: var(--font-display); text-transform: uppercase; line-height: 1.1; margin: 2em 0 .6em; }
.entry-content blockquote { margin: 2em 0; padding-left: 24px; border-left: 2px solid var(--accent); color: var(--muted); }
.entry-content img { border-radius: 4px; }
.entry-content .alignleft { float: left; margin: 0 24px 16px 0; }
.entry-content .alignright { float: right; margin: 0 0 16px 24px; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { color: var(--muted); font-size: 14px; }
.post-list { display: grid; gap: 24px; margin-top: 40px; }
.pagination { margin-top: 48px; display: flex; gap: 16px; flex-wrap: wrap; }
.pagination .current { color: var(--accent); }
.comments-area { margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); }
.comments-area ol { list-style: none; padding: 0; }
.comments-area li { margin-bottom: 24px; }
.comments-area input[type=text], .comments-area input[type=email], .comments-area input[type=url], .comments-area textarea { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line); padding: 12px; font: inherit; }
.comments-area input[type=submit] { background: var(--accent); color: var(--bg); border: 0; padding: 14px 28px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- Écrits (liste + lecteur) ---------- */
.reader-head { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; padding-top: 32px; padding-bottom: 32px; }
.reader-head__title { font-size: 64px; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 22px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; }
.chip:hover { border-color: var(--accent); }
.chip[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }

.reader { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-top: 8px; padding-bottom: 96px; }
.reader__list { flex: 1 1 300px; min-width: 0; max-width: 100%; border-top: 1px solid var(--line); }
.reader__item { display: flex; flex-direction: column; gap: 4px; padding: 20px 16px; border-bottom: 1px solid var(--line); }
.reader__item:hover { background: var(--surface); }
.reader__item[aria-current="page"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.reader__kicker { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.reader__item-title { font-family: var(--font-serif); font-weight: 600; font-size: 22px; line-height: 1.2; }
.reader__more { display: flex; padding: 20px 16px; font-weight: 600; color: var(--accent); }
.reader__more--newer { padding-bottom: 0; }

.reader__card { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; background: #F4EFE6; color: #1B1A17; padding: clamp(28px, 5vw, 72px); border-radius: 4px; }
.reader__meta { font-size: 14px; color: #5A5348; }
.reader__title { margin: 12px 0 0; font-family: var(--font-serif); font-weight: 600; font-size: clamp(34px, 4vw, 48px); line-height: 1.1; }
.reader__body { max-width: 34em; font-family: var(--font-serif); font-size: 22px; line-height: 1.8; overflow-wrap: anywhere; }
.reader__body > * { margin: 0 0 28px; }
.reader__body > :last-child { margin-bottom: 0; }
.reader__body a { color: #8A4A06; text-decoration: underline; text-underline-offset: 3px; }
.reader__body img { height: auto; border-radius: 2px; }
.reader__body h2, .reader__body h3 { font-family: var(--font-serif); line-height: 1.2; }
.reader__body blockquote { padding-left: 20px; border-left: 2px solid #8A4A06; font-style: italic; }
.reader__nav { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding-top: 24px; border-top: 1px solid #CFC7B8; font-size: 15px; }
.reader__nav a { font-weight: 600; color: #8A4A06; }
.reader__nav a:hover { text-decoration: underline; }
.reader__nav :only-child { margin-left: auto; }
.reader-comments { max-width: 760px; margin: -48px auto 96px; }

/* ---------- Le Voyageur page ---------- */
.voyageur { padding-top: 72px; padding-bottom: 96px; }
.voyageur__head { display: flex; flex-direction: column; align-items: center; gap: 32px; margin-bottom: 56px; text-align: center; }
.voyageur__head .cover { justify-self: auto; }
.voyageur__head .stack { align-items: center; gap: 12px; }
.voyageur__head .entry-title { margin: 0; }
.voyageur__content { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- Contact page ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; padding-top: 72px; padding-bottom: 96px; }
.contact__intro .entry-title { margin: 16px 0 24px; }
.contact__intro .entry-content { font-size: 18px; color: var(--muted); }
.contact__card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 4px; padding: 40px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.contact__card-title { font-size: 36px; margin-bottom: 24px; }
.contact__notice { color: var(--accent); }

/* Contact Form 7 */
.wpcf7-form p { margin: 0 0 22px; font-weight: 600; }
.wpcf7-form br { display: none; }
.wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.wpcf7-form input[type=text], .wpcf7-form input[type=email], .wpcf7-form input[type=tel], .wpcf7-form input[type=url], .wpcf7-form textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px;
  padding: 14px 16px; font: inherit; font-weight: 400; font-size: 17px; }
.wpcf7-form textarea { min-height: 200px; resize: vertical; }
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242, 179, 74, .25); }
.wpcf7-form input[type=submit] { background: var(--accent); color: var(--bg); border: 0; border-radius: 999px; padding: 16px 36px; font: inherit; font-weight: 600; font-size: 17px; cursor: pointer; }
.wpcf7-form input[type=submit]:hover { background: var(--accent-hover); }
.wpcf7-not-valid-tip { display: block; margin-top: 6px; color: #FF9B8A; font-size: 14px; font-weight: 500; }
.wpcf7-not-valid { border-color: #FF9B8A !important; }
.wpcf7 form .wpcf7-response-output { margin: 8px 0 0; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 4px; color: var(--text); }
.wpcf7 form.sent .wpcf7-response-output { border-color: #7FD1A0; }
.wpcf7-spinner { display: none; }

@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; }
  .section-title { font-size: 40px; }
  .pullquote p { font-size: 32px; }
  .card--featured { padding: 24px; }
  .contact__card { padding: 24px; }
  .wpcf7-form input[type=submit] { width: 100%; }
}
