/*
Theme Name: Corda
Theme URI: https://www.serveurhytale.fr/blog/
Author: Royal Magma
Description: Thème éditorial sombre pour blog de jeux et de culture web. Mise en avant du dernier article, grille de cartes, article lisible, responsive.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: corda
Tags: blog, dark, editorial, two-columns, custom-menu, featured-images
*/

:root {
  --corda-bg: #0b0f14;
  --corda-surface: #131a22;
  --corda-surface-2: #1a232e;
  --corda-line: rgba(255, 255, 255, .08);
  --corda-text: #e8eef5;
  --corda-muted: #93a1b1;
  --corda-accent: #2ee6a8;
  --corda-accent-2: #7c5cff;
  --corda-radius: 16px;
  --corda-max: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--corda-bg);
  color: var(--corda-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--corda-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.corda-wrap { width: 100%; max-width: var(--corda-max); margin: 0 auto; padding: 0 22px; }

/* ---------- en-tete ---------- */
.corda-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--corda-line);
}
.corda-header-inner { display: flex; align-items: center; gap: 26px; min-height: 72px; }

.corda-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.corda-brand:hover { text-decoration: none; }
.corda-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--corda-accent), var(--corda-accent-2));
  display: grid; place-items: center; color: #06110c; font-weight: 800; font-size: 18px;
}
.corda-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.corda-brand-name { font-weight: 800; font-size: 19px; color: var(--corda-text); letter-spacing: .2px; }
.corda-brand-tag { font-size: 11.5px; color: var(--corda-muted); letter-spacing: .10em; text-transform: uppercase; }

.corda-nav { margin-left: auto; }
.corda-nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.corda-nav a { color: var(--corda-muted); font-size: 15px; font-weight: 600; }
.corda-nav a:hover, .corda-nav .current-menu-item > a { color: var(--corda-text); text-decoration: none; }

.corda-burger { display: none; margin-left: auto; background: none; border: 1px solid var(--corda-line); color: var(--corda-text); border-radius: 10px; padding: 8px 12px; font-size: 15px; }

/* ---------- hero ---------- */
.corda-hero { padding: 44px 0 10px; }
.corda-hero-card {
  position: relative; overflow: hidden; border-radius: 22px;
  border: 1px solid var(--corda-line);
  background: var(--corda-surface);
  display: grid; grid-template-columns: 1.15fr .85fr; min-height: 380px;
}
.corda-hero-media { position: relative; min-height: 260px; }
.corda-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.corda-hero-body { padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.corda-kicker { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--corda-accent); font-weight: 700; }
.corda-hero-title { margin: 0; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; letter-spacing: -.02em; }
.corda-hero-title a { color: var(--corda-text); }
.corda-hero-excerpt { margin: 0; color: var(--corda-muted); font-size: 16px; }
.corda-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13.5px; color: var(--corda-muted); }
.corda-meta a { color: var(--corda-muted); }

/* ---------- sections ---------- */
.corda-section { padding: 40px 0; }
.corda-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.corda-section-title { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.corda-section-title span { color: var(--corda-accent); }
.corda-more { font-size: 14px; color: var(--corda-muted); }

/* ---------- grille ---------- */
.corda-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.corda-card {
  background: var(--corda-surface); border: 1px solid var(--corda-line);
  border-radius: var(--corda-radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s ease, border-color .18s ease;
}
.corda-card:hover { transform: translateY(-3px); border-color: rgba(46, 230, 168, .35); }
.corda-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--corda-surface-2); }
.corda-card-media img { width: 100%; height: 100%; object-fit: cover; }
.corda-card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.corda-card-title { margin: 0; font-size: 18.5px; line-height: 1.3; }
.corda-card-title a { color: var(--corda-text); }
.corda-card-excerpt { margin: 0; color: var(--corda-muted); font-size: 14.5px; line-height: 1.6; }
.corda-card .corda-meta { margin-top: auto; font-size: 12.5px; }

/* ---------- article ---------- */
.corda-single { padding: 34px 0 60px; }
.corda-crumbs { font-size: 13px; color: var(--corda-muted); margin-bottom: 18px; }
.corda-crumbs a { color: var(--corda-muted); }
.corda-single-head { max-width: 820px; margin: 0 auto 26px; }
.corda-single-title { margin: 8px 0 14px; font-size: clamp(28px, 4vw, 46px); line-height: 1.12; letter-spacing: -.025em; }
.corda-featured { max-width: 960px; margin: 0 auto 30px; border-radius: 20px; overflow: hidden; border: 1px solid var(--corda-line); }
.corda-featured img { width: 100%; }
.corda-content { max-width: 760px; margin: 0 auto; font-size: 17.5px; }
.corda-content h2 { font-size: 27px; line-height: 1.25; margin: 42px 0 14px; letter-spacing: -.015em; }
.corda-content h3 { font-size: 21px; margin: 32px 0 12px; }
.corda-content p { margin: 0 0 20px; }
.corda-content ul, .corda-content ol { margin: 0 0 22px; padding-left: 22px; }
.corda-content li { margin-bottom: 9px; }
.corda-content img { border-radius: 14px; margin: 26px 0; }
.corda-content blockquote {
  margin: 28px 0; padding: 18px 22px; border-left: 3px solid var(--corda-accent);
  background: var(--corda-surface); border-radius: 0 12px 12px 0; color: var(--corda-text);
}
.corda-content a { text-decoration: underline; text-underline-offset: 3px; }

.corda-tags { max-width: 760px; margin: 34px auto 0; display: flex; flex-wrap: wrap; gap: 8px; }
.corda-tags a {
  font-size: 13px; color: var(--corda-muted); border: 1px solid var(--corda-line);
  padding: 5px 11px; border-radius: 999px;
}
.corda-prevnext { max-width: 760px; margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.corda-prevnext a {
  display: block; padding: 18px 20px; border: 1px solid var(--corda-line);
  border-radius: 14px; background: var(--corda-surface); color: var(--corda-text);
}
.corda-prevnext small { display: block; color: var(--corda-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 6px; }

/* ---------- commentaires et pages ---------- */
.corda-page { padding: 40px 0 60px; }
.comment-list { list-style: none; padding: 0; }
.comment-list li { margin-bottom: 18px; }

/* ---------- pied ---------- */
.corda-footer { margin-top: 30px; border-top: 1px solid var(--corda-line); background: #080b0f; }
.corda-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; padding: 46px 0 30px; }
.corda-footer h3 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .12em; color: var(--corda-muted); }
.corda-footer p, .corda-footer li { color: var(--corda-muted); font-size: 14.5px; }
.corda-footer ul { list-style: none; margin: 0; padding: 0; }
.corda-footer li { margin-bottom: 8px; }
.corda-footer a { color: var(--corda-muted); }
.corda-footer a:hover { color: var(--corda-accent); }
.corda-copy { border-top: 1px solid var(--corda-line); padding: 18px 0 26px; font-size: 13px; color: var(--corda-muted); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- divers ---------- */
.corda-empty { padding: 60px 0; text-align: center; color: var(--corda-muted); }
.corda-pagination { display: flex; gap: 10px; justify-content: center; margin-top: 34px; }
.corda-pagination .page-numbers {
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--corda-line); color: var(--corda-muted);
}
.corda-pagination .current { background: var(--corda-accent); color: #06110c; border-color: transparent; font-weight: 700; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

@media (max-width: 980px) {
  .corda-hero-card { grid-template-columns: 1fr; }
  .corda-grid { grid-template-columns: repeat(2, 1fr); }
  .corda-footer-grid { grid-template-columns: 1fr 1fr; }
  .corda-nav { display: none; }
  .corda-burger { display: inline-flex; }
  .corda-nav.is-open {
    display: block; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--corda-surface); border-bottom: 1px solid var(--corda-line); padding: 14px 22px;
  }
  .corda-nav.is-open ul { flex-direction: column; gap: 12px; }
}

@media (max-width: 620px) {
  .corda-grid { grid-template-columns: 1fr; }
  .corda-footer-grid { grid-template-columns: 1fr; }
  .corda-prevnext { grid-template-columns: 1fr; }
  .corda-hero-body { padding: 26px 22px; }
}
