/*
Theme Name: Souverain — Livre bleu
Theme URI: https://souverain.ovh/
Author: Souverain
Description: Une lecture sobre pour le manifeste, les articles et la page contact de Souverain.
Version: 1.2.7
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: souverain-livre-bleu
*/

:root {
  color-scheme: light;
  --outside: #243a56;
  --paper: #fbf8f3;
  --sidebar: #dce5ed;
  --ink: #2c2c2b;
  --secondary: #595752;
  --rule: #d8d0c5;
  --focus: #242424;
  --font-display: "Big Caslon", "Libre Caslon Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: Baskerville, "Libre Baskerville", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: "Avenir Next", Avenir, "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--outside);
  color: var(--ink);
  font-family: var(--font-text);
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 14px;
  left: 14px;
  padding: 12px 18px;
  background: var(--paper);
  color: var(--ink);
  font: 600 15px/1.3 var(--font-ui);
  border: 2px solid var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-frame {
  width: min(1840px, calc(100% - 72px));
  min-height: calc(100vh - 88px);
  margin: 44px auto;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--paper);
  box-shadow: 8px 14px 32px rgb(51 42 31 / 13%);
}
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: min(100vh, 1060px);
  padding: 58px 30px 36px 42px;
  background: var(--sidebar);
}
.wordmark {
  display: inline-block;
  color: var(--ink);
  font: 400 54px/1 var(--font-display);
  letter-spacing: -.045em;
  text-decoration: none;
}
.wordmark:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.custom-logo-link { display: inline-block; max-width: 100%; vertical-align: top; }
.custom-logo { display: block; width: auto; max-width: 100%; max-height: 118px; height: auto; }
.sidebar-nav { margin-top: 54px; border-top: 1px solid var(--rule); }
.menu-list, .menu-list ul { margin: 0; padding: 0; list-style: none; }
.menu-list .sub-menu { padding: 0 0 8px 14px; }
.nav-link {
  position: relative;
  display: block;
  padding: 18px 4px 17px 19px;
  border-bottom: 1px solid var(--rule);
  font: 400 21px/1.25 var(--font-display);
  text-decoration: none;
}
.nav-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav-link[aria-current="page"]::before {
  content: "—";
  position: absolute;
  left: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  top: 22px;
}
.nav-link.section-parent::before {
  content: "—";
  position: absolute;
  left: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  top: 22px;
}
.menu-list .sub-menu .nav-link { padding: 10px 4px 10px 19px; border-bottom: 0; font-size: 17px; }
.menu-list .sub-menu .nav-link[aria-current="page"]::before,
.menu-list .sub-menu .nav-link.section-parent::before { top: 13px; }
.mobile-header, .mobile-menu-bar, .mobile-navigation { display: none; }

.main { min-width: 0; padding: 62px 58px 100px; }
.main-inner { width: 100%; }
.main--article { padding-left: 58px; padding-right: 58px; }
.article-layout { width: 100%; }
.page-title {
  margin: 0;
  padding-bottom: 35px;
  border-bottom: 1px solid var(--rule);
  font: 400 clamp(45px, 3.65vw, 68px)/1.06 var(--font-display);
  letter-spacing: -.035em;
  overflow-wrap: normal;
}
.page-title--manifesto { font-size: clamp(37px, 2.9vw, 52px); }
.prose { width: 100%; margin-top: 30px; }
.prose p {
  margin: 0 0 24px;
  font: 400 clamp(22px, 1.25vw, 24px)/1.68 var(--font-text);
}
.prose h2 {
  margin: 50px 0 15px;
  font: 400 38px/1.12 var(--font-display);
  letter-spacing: -.025em;
}
.prose h2:first-child { margin-top: 0; }
.prose .closing { margin-top: 28px; }
.page-footer {
  max-width: 720px;
  margin-top: 70px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--secondary);
  font: 14px/1.5 var(--font-ui);
}
.page-footer a { text-underline-offset: 3px; }

.article-list { width: 100%; margin-top: 10px; }
.article-preview { padding: 33px 0 37px; border-bottom: 1px solid var(--rule); }
.article-preview h2 {
  margin: 0 0 13px;
  font: 400 clamp(31px, 2.55vw, 40px)/1.15 var(--font-display);
  letter-spacing: -.025em;
}
.article-preview p {
  margin: 0 0 24px;
  font: 400 clamp(22px, 1.25vw, 24px)/1.68 var(--font-text);
}
.read-link, .pagination, .blog-note {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
}
.read-link { display: inline-block; font-weight: 600; text-underline-offset: 5px; }
.read-link:hover { text-decoration-thickness: 2px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 36px; }
.pagination a, .pagination span {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  text-decoration: none;
}
.pagination a:hover { text-decoration: underline; }
.pagination [aria-current="page"] { border: 1px solid var(--ink); }
.pagination .next, .pagination .previous { text-decoration: underline; text-underline-offset: 4px; }
.blog-note { max-width: 720px; margin: 32px 0 0; color: var(--secondary); }
.blog-note a { color: var(--ink); text-underline-offset: 3px; }

.article-back {
  display: inline-block;
  margin: 0 0 30px;
  font: 600 15px/1.5 var(--font-ui);
  text-underline-offset: 4px;
}
.article-back::before { content: "← "; }
.article-header { max-width: none; }
.article-header .page-title { padding-bottom: 21px; border-bottom: 0; }
.article-date {
  display: block;
  margin: 0 0 38px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--rule);
  color: var(--secondary);
  font: 15px/1.5 var(--font-ui);
}
.article-body { max-width: none; margin: 0; }
.article-body p, .article-body li {
  font: 400 clamp(22px, 1.25vw, 24px)/1.68 var(--font-text);
}
.article-body p { margin: 0 0 24px; }
.prose p strong, .prose p b,
.article-body p strong, .article-body p b,
.article-preview p strong, .article-preview p b { font-weight: 600; }
.article-body h2 {
  margin: 60px 0 19px;
  font: 400 39px/1.15 var(--font-display);
  letter-spacing: -.025em;
}
.article-body h3 {
  margin: 38px 0 15px;
  font: 400 30px/1.2 var(--font-display);
  letter-spacing: -.015em;
}
.article-body ul, .article-body ol { margin: 0 0 27px; padding-left: 28px; }
.article-body li { padding-left: 5px; margin-bottom: 9px; }
.article-body blockquote {
  margin: 36px 0;
  padding: 4px 0 4px 23px;
  border-left: 2px solid #78736c;
  font-style: italic;
}
.article-body blockquote p { margin-bottom: 0; }
.article-body a { text-underline-offset: 4px; overflow-wrap: anywhere; }
.article-body figure { margin: 39px 0 43px; }
.article-body img { display: block; max-width: 100%; height: auto; }
.article-body figcaption {
  margin-top: 9px;
  color: var(--secondary);
  font: 14px/1.5 var(--font-ui);
}
.article-body .media-link {
  margin: 32px 0;
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font: 15px/1.6 var(--font-ui);
}
.article-body .media-link a { font-weight: 600; }
.article-related { max-width: none; margin-top: 65px; padding-top: 25px; border-top: 1px solid var(--rule); }
.article-related a { font: 600 16px/1.5 var(--font-ui); text-underline-offset: 4px; }
.article-page .page-footer { max-width: none; }

.contact-prose { max-width: none; }

@media (max-width: 940px) {
  .site-frame { width: calc(100% - 40px); margin: 20px auto; grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { padding: 43px 18px 25px 28px; }
  .wordmark { font-size: 45px; }
  .nav-link { font-size: 18px; }
  .main { padding: 48px 35px 75px; }
  .page-title--manifesto { font-size: 41px; }
}
@media (max-width: 740px) {
  .site-frame { display: block; width: calc(100% - 24px); min-height: calc(100vh - 24px); margin: 12px auto; }
  .sidebar { display: none; }
  .mobile-header { display: block; padding: 24px 23px 23px; background: var(--sidebar); }
  .mobile-header .wordmark { font-size: 38px; }
  .mobile-header .custom-logo { max-height: 72px; }
  .mobile-menu-bar { display: block; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); }
  .menu-button {
    display: inline-flex;
    gap: 14px;
    align-items: center;
    min-height: 51px;
    margin: 0;
    padding: 8px 23px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: 600 13px/1.3 var(--font-ui);
    text-transform: uppercase;
    letter-spacing: .03em;
    cursor: pointer;
  }
  .menu-icon { display: inline-grid; gap: 4px; width: 20px; }
  .menu-icon::before, .menu-icon::after, .menu-icon span { content: ""; display: block; height: 1.5px; background: currentColor; }
  .mobile-navigation { display: block; padding: 5px 23px 14px; border-bottom: 1px solid var(--rule); background: var(--sidebar); }
  .mobile-navigation[hidden] { display: none; }
  .mobile-navigation .nav-link { font-size: 23px; padding: 18px 4px 17px 19px; }
  .main { padding: 36px 23px 72px; }
  .page-title { padding-bottom: 24px; font-size: clamp(40px, 8.7vw, 58px); }
  .article-page .article-header .page-title {
    font: 400 clamp(32px, 6vw, 40px)/1.2 "Libre Baskerville", Georgia, serif;
    letter-spacing: -.025em;
  }
  .page-title--manifesto { font-size: clamp(39px, 7.7vw, 55px); }
  .prose { margin-top: 25px; }
  .prose p { font-size: 20px; line-height: 1.62; }
  .prose h2 { margin-top: 43px; font-size: 35px; }
  .article-preview { padding: 28px 0 31px; }
  .article-preview h2 { font-size: clamp(30px, 7vw, 37px); }
  .article-preview p { font-size: 20px; line-height: 1.62; }
  .article-back { margin-bottom: 24px; }
  .article-date { margin-bottom: 31px; }
  .article-body p, .article-body li { font-size: 20px; line-height: 1.62; }
  .article-body h2 { margin-top: 50px; font-size: 35px; }
  .article-body h3 { font-size: 28px; }
}
@media (max-width: 370px) {
  .main { padding-left: 19px; padding-right: 19px; }
  .mobile-header { padding-left: 19px; }
  .menu-button { padding-left: 19px; }
  .mobile-navigation { padding-left: 19px; padding-right: 19px; }
  .page-title--manifesto { font-size: 37px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


/* Keep the original live Big Caslon wordmark and place only the Mont above it. */
.wordmark { position: relative; }
.wordmark .mont-motif { position: absolute; top: -25px; left: 50%; display: block; width: 112px; height: auto; transform: translateX(-50%); pointer-events: none; }
@media (max-width: 940px) { .wordmark .mont-motif { top: -24px; width: 104px; } }
@media (max-width: 740px) { .mobile-header .wordmark .mont-motif { top: -22px; width: 90px; } }

/* WordPress content and archive output. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  position: fixed;
  z-index: 101;
  top: 14px;
  left: 14px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip: auto;
  background: var(--paper);
}
.preview-title-link { color: inherit; text-decoration: none; }
.preview-title-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.preview-copy > :last-child { margin-bottom: 18px; }
.preview-copy img, .prose img, .article-body img { max-width: 100%; height: auto; }
.preview-copy iframe, .prose iframe, .article-body iframe,
.preview-copy video, .prose video, .article-body video { max-width: 100%; }
.preview-copy .more-link { display: none; }
.prose > :first-child, .article-body > :first-child { margin-top: 0; }
.prose p:empty, .article-body p:empty { display: none; }
.prose a, .article-body a { text-underline-offset: 4px; }
.prose ul, .prose ol { padding-left: 28px; font: 400 clamp(22px, 1.25vw, 24px)/1.68 var(--font-text); }
.prose li { margin: 0 0 9px; }
.prose blockquote { margin: 36px 0; padding: 4px 0 4px 23px; border-left: 2px solid #78736c; font-style: italic; }
.prose figure { max-width: 100%; margin: 39px 0 43px; }
.prose figcaption { margin-top: 9px; color: var(--secondary); font: 14px/1.5 var(--font-ui); }
.prose .wp-block-image, .article-body .wp-block-image { max-width: 100%; }
.prose .wp-block-image img, .article-body .wp-block-image img { height: auto; }
.prose .wp-block-embed, .article-body .wp-block-embed { max-width: 100%; }
.prose .wp-block-embed__wrapper, .article-body .wp-block-embed__wrapper { max-width: 100%; overflow: hidden; }
.prose .aligncenter, .article-body .aligncenter { margin-right: auto; margin-left: auto; }
.prose .alignwide, .prose .alignfull, .article-body .alignwide, .article-body .alignfull { max-width: 100%; }
.article-body h4 { margin: 32px 0 12px; font: 400 26px/1.2 var(--font-display); }
.article-body hr, .prose hr { margin: 42px 0; border: 0; border-top: 1px solid var(--rule); }
.article-body table, .prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-body th, .article-body td, .prose th, .prose td { padding: 9px 12px; border: 1px solid var(--rule); text-align: left; }
.article-body pre, .prose pre { max-width: 100%; overflow-x: auto; padding: 18px; background: #f0ece6; font: 14px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-body code, .prose code { overflow-wrap: anywhere; }
.article-body .wp-block-button__link, .prose .wp-block-button__link { color: var(--paper); background: var(--ink); border-radius: 0; font: 600 15px/1.4 var(--font-ui); }
.article-body .wp-block-buttons { margin: 43px 0 55px; }
.article-body .wp-block-button.is-style-outline { display: block; width: 100%; }
.article-body .wp-block-button.is-style-outline > .wp-block-button__link {
  display: block;
  width: 100%;
  padding: 23px 27px;
  border: 1px solid var(--outside);
  border-radius: 0;
  background: #eaf0f4;
  color: var(--outside);
  font: 500 19px/1.55 "Libre Baskerville", Georgia, serif;
  text-align: left;
  text-decoration: none;
  transition: background-color .15s ease;
}
.article-body .wp-block-button.is-style-outline > .wp-block-button__link em { font-style: normal; font-weight: inherit; }
.article-body .wp-block-button.is-style-outline > .wp-block-button__link::after { content: " ↗"; white-space: nowrap; }
.article-body .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #dce5ed; }
.article-body .wp-block-button.is-style-outline > .wp-block-button__link:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.post-pages { margin-top: 45px; font: 600 15px/1.5 var(--font-ui); }
.post-pages a { margin: 0 8px; }

/* WordPress' real pagination keeps the approved numbered appearance. */
.pagination { display: block; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 7px 11px; text-decoration: none; }
.pagination a.page-numbers:hover { text-decoration: underline; }
.pagination .page-numbers.current { border: 1px solid var(--ink); }
.pagination .page-numbers.prev, .pagination .page-numbers.next { text-decoration: underline; text-underline-offset: 4px; }

/* Contact Form 7 remains provided by the existing WordPress installation. */
.contact-prose .wpcf7 { max-width: 720px; margin-top: 42px; }
.contact-prose .wpcf7 form p { margin: 0 0 26px; font: 400 16px/1.5 var(--font-ui); }
.contact-prose .wpcf7 label { display: block; margin-bottom: 9px; font: 600 15px/1.4 var(--font-ui); }
.contact-prose .wpcf7-form-control-wrap { display: block; margin-top: 9px; }
.contact-prose .wpcf7 input[type="text"],
.contact-prose .wpcf7 input[type="email"],
.contact-prose .wpcf7 input[type="tel"],
.contact-prose .wpcf7 textarea {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid #9d978e;
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 19px/1.4 var(--font-text);
}
.contact-prose .wpcf7 textarea { min-height: 150px; resize: vertical; }
.contact-prose .wpcf7 input[type="submit"] {
  min-height: 50px;
  padding: 12px 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 600 15px/1.35 var(--font-ui);
  cursor: pointer;
}
.contact-prose .wpcf7 input[type="submit"]:hover { background: #494846; }
.contact-prose .wpcf7 .wpcf7-not-valid-tip,
.contact-prose .wpcf7 .wpcf7-response-output { font: 15px/1.5 var(--font-ui); }
.contact-prose .wpcf7 form.sent .wpcf7-response-output { border-color: var(--ink); }

/* Keep the existing comment form usable while WordPress is live. */
.comments-area { margin-top: 70px; padding-top: 28px; border-top: 1px solid var(--rule); max-width: 920px; }
.comments-area h2, .comments-area h3 { margin: 0 0 22px; font: 400 32px/1.2 var(--font-display); }
.comments-area p, .comments-area li { font: 17px/1.6 var(--font-text); }
.comments-area .comment-list { list-style: none; padding: 0; }
.comments-area .comment-list li { margin: 0 0 26px; padding: 0 0 23px; border-bottom: 1px solid var(--rule); }
.comments-area .children { list-style: none; margin-top: 20px; padding-left: 24px; }
.comments-area label { display: block; margin: 18px 0 8px; font: 600 15px/1.4 var(--font-ui); }
.comments-area input[type="text"], .comments-area input[type="email"], .comments-area input[type="url"], .comments-area textarea { display: block; width: min(100%, 720px); padding: 10px 12px; border: 1px solid #9d978e; background: var(--paper); color: var(--ink); font: 18px/1.5 var(--font-text); }
.comments-area input[type="submit"] { min-height: 48px; padding: 10px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 15px/1.4 var(--font-ui); cursor: pointer; }
.comments-area .navigation { margin: 20px 0; font: 15px/1.5 var(--font-ui); }

@media (max-width: 740px) {
  .prose ul, .prose ol { font-size: 20px; line-height: 1.62; }
  .comments-area { margin-top: 55px; }
}
