/*
Theme Name: Mon avis sur tout
Description: Thème de blog à la une de journal classique : titre centré sous un filet épais-fin, billet du moment en grand, colonne des billets précédents, archives datées, rubriques, mode sombre automatique. Polices embarquées, aucun appel à des services externes.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mon-avis-sur-tout
*/

:root {
  --paper: #F1F2EE;
  --paper-2: #E6E8E2;
  --ink: #1A1E23;
  --ink-soft: #4B525B;
  --rule: #B4B9B1;
  --accent: #1E3A66;
  --on-accent: #F1F2EE;
  --display: 'Old Standard TT', 'Times New Roman', Georgia, serif;
  --text: 'Newsreader', Georgia, 'Times New Roman', serif;
  --label: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15181C;
    --paper-2: #1E2227;
    --ink: #E8E7E1;
    --ink-soft: #A5ABB3;
    --rule: #3A4048;
    --accent: #8FB2E6;
    --on-accent: #10151B;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; width: 1px; word-wrap: normal;
}
.screen-reader-text:focus {
  background: var(--paper); clip: auto; clip-path: none; height: auto; width: auto; margin: 0; padding: .8rem 1rem;
  left: 8px; top: 8px; z-index: 100000; color: var(--ink);
}

.page {
  max-width: 1080px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 56px;
}

/* Titre du journal */
.dateline, .bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap;
  font: 500 .72rem/1.4 var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  padding-bottom: .9rem;
}
.masthead { text-align: center; padding: .6rem 0 1.2rem; }
.site-title {
  font: 700 clamp(2.5rem, 9vw, 5.4rem)/1 var(--display); letter-spacing: -.015em; margin: 0; text-wrap: balance;
}
.site-title a { text-decoration: none; }
.tagline { font: italic 400 1.15rem/1.4 var(--text); color: var(--ink-soft); margin: .8rem 0 0; }
.rule2 { border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); height: 3px; }

/* Rubriques et actions */
.nav {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem 1rem; flex-wrap: wrap;
  padding: .55rem 0; border-bottom: 1px solid var(--rule);
}
.chips { display: flex; gap: 0 1.3rem; flex-wrap: wrap; }
.chip {
  display: inline-block; border-bottom: 2px solid transparent; padding: .65rem 0 .5rem; text-decoration: none;
  font: 600 .72rem var(--label); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
}
.chip:hover { color: var(--ink); }
.chip[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.actions { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; text-decoration: none;
  font: 600 .76rem var(--label); letter-spacing: .08em; text-transform: uppercase;
  padding: .75rem 1.2rem; min-height: 44px; border: 1px solid var(--accent); background: var(--accent);
  color: var(--on-accent); border-radius: 2px;
}
.btn.ghost { background: transparent; color: var(--accent); }
.linkbtn {
  font: 500 .8rem var(--label); color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--ink); }
.label { font: 600 .7rem var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.kicker { font: 600 .72rem var(--label); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.meta { font: 500 .76rem var(--label); letter-spacing: .03em; color: var(--ink-soft); margin: 0; }
.meta span + span::before, .byline span + span::before { content: "·"; margin: 0 .55em; }

/* Une */
.front { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 2.5rem; padding: 2rem 0 1rem; }
.lead h2 {
  font: 700 clamp(2rem, 4.6vw, 3.3rem)/1.08 var(--display); margin: .6rem 0 .9rem; text-wrap: balance;
}
.lead h2 a, .side h3 a { text-decoration: none; color: inherit; }
.lead h2 a:hover, .side h3 a:hover, .row:hover .row-title {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.extract { font-size: 1.2rem; line-height: 1.65; max-width: 58ch; margin: 1.1rem 0 1.2rem; }
.more { font: 600 .76rem var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }
.side { border-left: 1px solid var(--rule); padding-left: 2rem; min-width: 0; }
.side > .label { display: block; padding-bottom: .7rem; }
.side article { padding: 1.05rem 0 1.15rem; border-top: 1px solid var(--rule); }
.side h3 { font: 700 1.3rem/1.2 var(--display); margin: .4rem 0 .5rem; text-wrap: balance; }

/* Archives */
.archive { padding: 1.5rem 0 0; }
.archive > h3 { margin: 0 0 .7rem; padding-top: 1rem; border-top: 3px solid var(--ink); }
.row {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 9rem; gap: .2rem 1.2rem; align-items: baseline;
  padding: .85rem 0; border-top: 1px solid var(--rule); text-decoration: none;
}
.row-title { font: 700 1.25rem/1.25 var(--display); }
.row .kicker { text-align: right; }
.pagination { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font: 600 .76rem var(--label); letter-spacing: .08em; text-transform: uppercase; }
.pagination a { text-decoration: none; color: var(--accent); }
.pagination a:hover { text-decoration: underline; text-underline-offset: 4px; }
.pagination .current { color: var(--ink); border-bottom: 2px solid var(--accent); }

/* Page blanche */
.empty { text-align: center; padding: 4rem 0 5rem; margin-inline: auto; max-width: 34rem; color: var(--ink-soft); }
.empty-line { font: italic 400 clamp(1.8rem, 5vw, 2.6rem)/1.15 var(--display); color: var(--ink); margin: 0 0 1rem; }
.empty p { margin: 0 0 1.5rem; }

/* Billet */
.article { max-width: 680px; margin-inline: auto; padding: 1.6rem 0 2rem; }
.article h1 { font: 700 clamp(2.1rem, 6vw, 3.4rem)/1.08 var(--display); margin: .7rem 0 1.1rem; text-wrap: balance; }
.byline {
  font: 500 .78rem var(--label); letter-spacing: .03em; color: var(--ink-soft);
  padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); margin: 0 0 1.8rem;
}
.article-figure { margin: 0 0 1.8rem; }
.article-figure img { display: block; width: 100%; }
.prose > * { max-width: 100%; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; font-size: 1.22rem; line-height: 1.72; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.prose strong, .prose b { font-weight: 600; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose h2, .prose h3, .prose h4 { font: 700 1.55rem/1.25 var(--display); margin: 2em 0 .6em; text-wrap: balance; }
.prose h2 { font-size: 1.8rem; }
.prose blockquote, .prose .wp-block-pullquote {
  margin: 1.9em 0; padding: 1.1rem 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  border-left: 0; border-right: 0;
}
.prose blockquote p, .prose .wp-block-pullquote p { font: italic 400 1.55rem/1.4 var(--display); margin: 0; }
.prose blockquote cite, .prose .wp-block-pullquote cite {
  display: block; margin-top: .7rem; font: 500 .78rem var(--label); font-style: normal;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
}
.prose figure { margin: 1.8em 0; }
.prose img { display: block; }
.prose figcaption, .prose .wp-caption-text { font: 400 .8rem/1.45 var(--label); color: var(--ink-soft); margin-top: .5rem; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2em 0; }
.prose .alignleft { float: left; margin: .3em 1.4em 1em 0; max-width: 50%; }
.prose .alignright { float: right; margin: .3em 0 1em 1.4em; max-width: 50%; }
.prose .aligncenter { margin-inline: auto; }
.prose::after { content: ""; display: block; clear: both; }
.article-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 3px solid var(--ink); }
.pager a { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; }
.pager .r { text-align: right; }
.pager .r a { align-items: flex-end; }
.pg-title { font: 700 1.2rem/1.25 var(--display); }
.pager a:hover .pg-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.colophon {
  margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule);
  font: 400 .74rem var(--label); letter-spacing: .04em; color: var(--ink-soft); text-align: center;
}
.colophon a { color: inherit; }

@media (max-width: 820px) {
  .front { grid-template-columns: minmax(0, 1fr); }
  .side { border-left: 0; padding-left: 0; margin-top: 2rem; padding-top: 1rem; border-top: 3px solid var(--ink); }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .kicker { text-align: left; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .r { text-align: left; }
  .pager .r a { align-items: flex-start; }
}
