/*
Theme Name: Focus Info
Theme URI: https://focusinfos.org
Description: Thème éditorial magazine pour Focus Infos — lecture claire, une forte, navigation par catégories.
Author: StickHosting
Version: 2.4.0
Text Domain: focusinfo
*/

/* Palette alignée sur le logo Focus Infos : cyan/bleu + rouge */
:root {
  --ink: #0b1a2a;
  --ink-soft: #1f3348;
  --muted: #5b6f80;
  --line: #d4e2ec;
  --paper: #f3f7fb;
  --surface: #ffffff;
  --brand: #0096e8;
  --brand-deep: #0069c2;
  --brand-bright: #20c0f0;
  --warm: #e8f4fc;
  --alert: #d00000;
  --shadow: 0 12px 40px rgba(11, 26, 42, 0.08);
  --radius: 14px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;
  --max: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(18, 163, 138, 0.12), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(10, 107, 92, 0.08), transparent 50%),
    linear-gradient(180deg, #eef5fb 0%, var(--paper) 28%, #e8f1f8 100%);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--brand-deep); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); }

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

/* —— Top bar —— */
.topbar {
  background: var(--ink);
  color: rgba(255,255,255,.82);
  font-size: .82rem;
  letter-spacing: .02em;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .55rem 0;
  flex-wrap: wrap;
}
.topbar strong { color: #fff; font-weight: 600; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }

/* —— Header / brand —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(243, 247, 251, 0.9);
  border-bottom: 1px solid rgba(213, 224, 228, 0.85);
}
.site-header .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .95rem 0;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  color: var(--ink);
}
.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: min(200px, 55vw);
  object-fit: contain;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav {
  display: flex;
  gap: .15rem .95rem;
  flex-wrap: wrap;
  align-items: center;
}
.nav a {
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 600;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--brand);
  border-bottom-color: var(--brand-bright);
  text-decoration: none;
}
.search-form {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  min-width: min(240px, 70vw);
}
.search-form input[type="search"] {
  border: 0;
  background: transparent;
  padding: .55rem .9rem;
  width: 100%;
  font: inherit;
  color: var(--ink);
  outline: none;
}
.search-form button {
  border: 0;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 650;
  padding: .55rem 1rem;
  cursor: pointer;
}
.search-form button:hover { background: var(--brand-deep); }

/* —— Category rail —— */
.cat-rail {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.55);
}
.cat-rail .wrap {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: .75rem 0;
  scrollbar-width: thin;
}
.cat-chip {
  flex: 0 0 auto;
  padding: .4rem .85rem;
  border-radius: 999px;
  background: var(--warm);
  color: var(--ink-soft);
  font-size: .84rem;
  font-weight: 650;
  border: 1px solid transparent;
}
.cat-chip:hover,
.cat-chip.is-active {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}

/* —— Hero une —— */
.hero-block {
  padding: 1.6rem 0 0.4rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr .9fr;
  gap: 1.1rem;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.lead-story {
  position: relative;
  min-height: clamp(320px, 48vw, 460px);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow);
  animation: rise .7s ease both;
}
.lead-story a.cover {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.lead-story img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .88;
  transform: scale(1.02);
  transition: transform .8s ease;
}
.lead-story:hover img { transform: scale(1.06); }
.lead-story .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,28,36,.15) 20%, rgba(14,28,36,.88) 100%);
  z-index: 2;
  pointer-events: none;
}
.lead-story .copy {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 1.5rem 1.4rem 1.6rem;
  color: #fff;
  pointer-events: none;
}
.lead-story .copy a { pointer-events: auto; color: #fff; }
.lead-story .kicker {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7ad8ff;
  margin-bottom: .55rem;
}
.lead-story h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.45rem, 3.2vw, 2.35rem);
  color: #fff;
  max-width: 22ch;
}
.lead-story .excerpt {
  margin: 0;
  color: rgba(255,255,255,.88);
  max-width: 48ch;
  font-size: .98rem;
}
.side-stack {
  display: grid;
  gap: .9rem;
}
.side-card {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: .85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 118px;
  box-shadow: 0 6px 20px rgba(14,28,36,.04);
  animation: rise .7s ease both;
}
.side-card:nth-child(2) { animation-delay: .08s; }
.side-card:nth-child(3) { animation-delay: .16s; }
.side-card .thumb {
  background: #d5e6f2;
  min-height: 100%;
}
.side-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-card .body { padding: .85rem .85rem .85rem 0; display: flex; flex-direction: column; justify-content: center; }
.side-card h3 { margin: 0 0 .35rem; font-size: 1.02rem; }
.side-card h3 a { color: var(--ink); }
.side-card h3 a:hover { color: var(--brand); }
.meta {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 550;
  margin-bottom: .35rem;
}
.meta .dot::before,
.focus-stats .dot::before,
.byline .dot::before { content: "·"; margin: 0 .35rem; }
.focus-stats {
  display: inline;
  color: inherit;
  font-weight: 600;
}
.byline-stats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .15rem .2rem;
  align-items: center;
}
.byline-stats .focus-stats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .15rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: var(--warm);
  color: var(--ink-soft);
  font-size: .82rem;
  font-weight: 650;
}
.lead-story .focus-stats,
.lead-story .meta { color: rgba(255,255,255,.88); }

/* —— Sections —— */
.section {
  padding: 1.8rem 0 0.4rem;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: .55rem;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}
.section-head a {
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
@media (max-width: 900px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .story-grid { grid-template-columns: 1fr; }
  .side-card { grid-template-columns: 96px 1fr; }
}
.story-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(14,28,36,.04);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: rise .65s ease both;
}
.story-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.story-card .thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #b9d8f0, #e8f3fa);
  overflow: hidden;
}
.story-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.story-card:hover .thumb img { transform: scale(1.04); }
.story-card .body {
  padding: .95rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: 1;
}
.story-card h3 {
  margin: 0;
  font-size: 1.08rem;
}
.story-card h3 a { color: var(--ink); }
.story-card h3 a:hover { color: var(--brand); }
.story-card p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  flex: 1;
}
.cat-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand);
}

/* —— Page / archive titles —— */
.page-hero {
  padding: 1.6rem 0 0.2rem;
}
.page-hero h1 {
  margin: 0 0 .35rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.page-hero p { margin: 0; color: var(--muted); max-width: 48ch; }

/* —— Single article —— */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.6rem;
  padding: 1.4rem 0 2.5rem;
}
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
}
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: clamp(1.1rem, 2.5vw, 2rem);
  box-shadow: var(--shadow);
}
.article .kicker { color: var(--brand); font-weight: 750; text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.article h1 {
  margin: .45rem 0 .7rem;
  font-size: clamp(1.65rem, 3.2vw, 2.45rem);
}
.article .byline {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .85rem;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 1rem;
}
.article .featured {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 12px;
  margin: .4rem 0 1.1rem;
  background: #d5e6f2;
}
.article .content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.article .content p { margin: 0 0 1.05rem; }
.article .content h2,
.article .content h3 { margin: 1.4rem 0 .6rem; }
.article .content img {
  border-radius: 10px;
  margin: 1rem 0;
}
.article .content blockquote {
  margin: 1.2rem 0;
  padding: .85rem 1rem;
  border-left: 4px solid var(--brand);
  background: var(--warm);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.12rem;
}
.credit {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}
.sidebar .widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.sidebar .widget h3 {
  margin: 0 0 .75rem;
  font-size: 1.05rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--ink);
}
.related-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: .65rem;
  margin-bottom: .85rem;
}
.related-item:last-child { margin-bottom: 0; }
.related-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: #d5e6f2;
}
.related-item h4 {
  margin: 0;
  font-size: .92rem;
  font-family: var(--font-body);
  font-weight: 700;
}
.related-item h4 a { color: var(--ink); }

/* —— Static pages —— */
.page-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: clamp(1.1rem, 2.5vw, 2rem);
  margin: 1.2rem 0 2.4rem;
  box-shadow: var(--shadow);
}
.page-panel h1 { margin-top: 0; }
.page-panel .content { font-size: 1.05rem; color: var(--ink-soft); }

/* —— Pagination —— */
.nav-links,
.pagination {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1.4rem 0 2.2rem;
}
.pagination .page-numbers,
.pagination ul {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a,
.nav-links span,
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 .7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 650;
  font-size: .9rem;
}
.nav-links .current,
.page-numbers.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* —— Footer —— */
.site-footer {
  margin-top: 2rem;
  background: var(--ink);
  color: rgba(255,255,255,.78);
  padding: 2.2rem 0 1.4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h3 {
  color: #fff;
  font-size: 1.05rem;
  margin: 0 0 .7rem;
}
.site-footer p { margin: 0 0 .55rem; }
.site-footer a { color: #7ad8ff; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1rem;
  font-size: .85rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  margin: 1.5rem 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
