/*
Theme Name: RafaTrades Challenge 100K
Theme URI: https://rafatrades.com
Author: Rafael Ponce
Author URI: https://rafatrades.com
Description: Thème éditorial et tableau de bord pour documenter publiquement le Challenge RafaTrades 100K.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: rafatrades
*/

:root {
  --rt-bg: #090b0e;
  --rt-panel: #11151a;
  --rt-panel-2: #171c22;
  --rt-text: #f5f7fa;
  --rt-muted: #9ba6b2;
  --rt-line: #29313a;
  --rt-accent: #ff5c35;
  --rt-accent-2: #ffc857;
  --rt-positive: #64d98b;
  --rt-negative: #ff746c;
  --rt-max: 1180px;
  --rt-radius: 20px;
  --rt-shadow: 0 24px 60px rgba(0, 0, 0, .26);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rt-bg);
  color: var(--rt-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 460px;
  z-index: -1;
  background:
    radial-gradient(circle at 78% 8%, rgba(255,92,53,.13), transparent 30%),
    linear-gradient(180deg, #11151a 0%, transparent 100%);
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--rt-accent-2); }
img { max-width: 100%; height: auto; border-radius: 14px; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--rt-accent-2); outline-offset: 3px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.rt-wrap { width: min(calc(100% - 40px), var(--rt-max)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(9,11,14,.88); backdrop-filter: blur(18px); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; font-size: 1.05rem; font-weight: 850; letter-spacing: -.03em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--rt-accent); color: #fff; font-size: .82rem; box-shadow: 0 8px 24px rgba(255,92,53,.24); }
.brand-name span { color: var(--rt-accent); }
.site-nav ul { display: flex; align-items: center; gap: 28px; list-style: none; padding: 0; margin: 0; }
.site-nav a { color: #dce1e7; font-size: .9rem; font-weight: 700; }
.site-nav a:hover { color: #fff; }
.nav-cta { padding: 10px 16px; border: 1px solid var(--rt-line); border-radius: 99px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--rt-line); border-radius: 12px; background: var(--rt-panel); color: #fff; cursor: pointer; }

.challenge-hero { padding: 68px 0 54px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(480px, 1.1fr); align-items: center; gap: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 18px; color: var(--rt-accent-2); font-size: .77rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--rt-accent); }
h1, h2, h3 { margin-top: 0; line-height: 1.08; letter-spacing: -.045em; }
h1 { max-width: 720px; margin-bottom: 24px; font-size: clamp(3rem, 7vw, 6.7rem); }
h1 em { color: var(--rt-accent); font-style: normal; }
.hero-copy { max-width: 590px; margin: 0 0 30px; color: #bdc5cd; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.rt-button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 1px solid var(--rt-accent); border-radius: 12px; background: var(--rt-accent); color: #fff; font-size: .9rem; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.rt-button:hover { transform: translateY(-2px); background: #ff714f; color: #fff; }
.rt-button--ghost { border-color: var(--rt-line); background: transparent; }
.rt-button--ghost:hover { background: var(--rt-panel-2); }

.dashboard-card { position: relative; overflow: hidden; padding: 32px; border: 1px solid #303944; border-radius: 26px; background: linear-gradient(145deg, #171c22, #0e1115); box-shadow: var(--rt-shadow); }
.dashboard-card::after { content: "100K"; position: absolute; right: -12px; top: -34px; color: rgba(255,255,255,.025); font-size: 8.5rem; font-weight: 950; letter-spacing: -.1em; pointer-events: none; }
.dashboard-top { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.dashboard-label { color: var(--rt-muted); font-size: .78rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.dashboard-amount { margin: 5px 0 0; font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 900; line-height: 1; letter-spacing: -.065em; }
.dashboard-goal { align-self: flex-end; color: var(--rt-muted); font-weight: 700; white-space: nowrap; }
.progress-track { height: 12px; overflow: hidden; margin: 0 0 12px; border-radius: 99px; background: #272e36; }
.progress-value { width: var(--progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rt-accent), var(--rt-accent-2)); box-shadow: 0 0 22px rgba(255,92,53,.45); }
.progress-meta { display: flex; justify-content: space-between; color: var(--rt-muted); font-size: .82rem; font-weight: 700; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 28px; overflow: hidden; border: 1px solid var(--rt-line); border-radius: 16px; background: var(--rt-line); }
.mini-stat { padding: 17px; background: #12171c; }
.mini-stat strong { display: block; margin-bottom: 2px; font-size: 1.22rem; letter-spacing: -.03em; }
.mini-stat span { color: var(--rt-muted); font-size: .74rem; }
.latest-update { display: flex; align-items: center; gap: 11px; margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--rt-line); color: #d8dee5; font-size: .84rem; }
.update-icon { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: rgba(100,217,139,.12); color: var(--rt-positive); font-weight: 900; }

.trust-strip { border-block: 1px solid var(--rt-line); background: #0d1014; }
.trust-inner { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-item { padding: 23px 32px; border-right: 1px solid var(--rt-line); }
.trust-item:last-child { border-right: 0; }
.trust-item strong { display: block; margin-bottom: 3px; font-size: .94rem; }
.trust-item span { color: var(--rt-muted); font-size: .79rem; }

.section { padding: 92px 0; }
.section--tight { padding: 66px 0; }
.section--panel { background: #0d1014; border-block: 1px solid var(--rt-line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 36px; }
.section-heading h2 { max-width: 740px; margin-bottom: 0; font-size: clamp(2.1rem, 5vw, 4rem); }
.section-heading p { max-width: 470px; margin: 0; color: var(--rt-muted); }
.text-link { color: var(--rt-accent-2); font-size: .9rem; font-weight: 800; white-space: nowrap; }
.text-link::after { content: " →"; }

.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: rule; }
.rule-card { min-height: 190px; padding: 26px; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); background: var(--rt-panel); counter-increment: rule; }
.rule-card::before { content: "0" counter(rule); display: block; margin-bottom: 28px; color: var(--rt-accent); font-size: .76rem; font-weight: 900; letter-spacing: .12em; }
.rule-card h3 { margin-bottom: 10px; font-size: 1.1rem; letter-spacing: -.025em; }
.rule-card p { margin: 0; color: var(--rt-muted); font-size: .88rem; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { display: flex; min-height: 330px; flex-direction: column; overflow: hidden; border: 1px solid var(--rt-line); border-radius: var(--rt-radius); background: var(--rt-panel); transition: transform .2s ease, border-color .2s ease; }
.post-card:hover { transform: translateY(-4px); border-color: #46515d; }
.post-card-image { aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--rt-line); background: linear-gradient(135deg, #1d242c, #11151a); }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.post-card-body { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.post-meta { margin-bottom: 14px; color: var(--rt-accent-2); font-size: .73rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.post-card h3 { margin-bottom: 12px; font-size: 1.3rem; }
.post-card p { margin: 0 0 18px; color: var(--rt-muted); font-size: .88rem; }
.post-card .text-link { margin-top: auto; }
.empty-state { grid-column: 1 / -1; padding: 34px; border: 1px dashed #39434e; border-radius: var(--rt-radius); color: var(--rt-muted); text-align: center; }

.manifesto { display: grid; grid-template-columns: .75fr 1.25fr; gap: 70px; align-items: start; }
.manifesto-quote { position: sticky; top: 120px; padding-left: 24px; border-left: 4px solid var(--rt-accent); font-size: clamp(1.7rem, 3vw, 2.7rem); font-weight: 850; line-height: 1.15; letter-spacing: -.04em; }
.manifesto-copy p { margin-top: 0; color: #bdc5cd; }
.manifesto-copy strong { color: #fff; }

.newsletter { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 36px; padding: 42px; border: 1px solid rgba(255,92,53,.38); border-radius: 24px; background: linear-gradient(120deg, rgba(255,92,53,.12), rgba(255,200,87,.04)); }
.newsletter h2 { margin-bottom: 8px; font-size: clamp(1.8rem, 4vw, 3rem); }
.newsletter p { margin: 0; color: var(--rt-muted); }

.content-shell { width: min(calc(100% - 40px), 820px); margin: 0 auto; padding: 76px 0 100px; }
.archive-shell { width: min(calc(100% - 40px), var(--rt-max)); margin: 0 auto; padding: 70px 0 100px; }
.page-kicker { color: var(--rt-accent); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.entry-header { margin-bottom: 42px; }
.entry-header h1 { margin: 12px 0 18px; font-size: clamp(2.5rem, 7vw, 5rem); }
.entry-meta { color: var(--rt-muted); font-size: .85rem; }
.entry-content { color: #c5cdd5; }
.entry-content h2 { margin: 2.4em 0 .65em; color: #fff; font-size: 2rem; }
.entry-content h3 { margin: 2em 0 .65em; color: #fff; font-size: 1.35rem; }
.entry-content a { color: var(--rt-accent-2); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin: 36px 0; padding: 5px 0 5px 24px; border-left: 4px solid var(--rt-accent); color: #fff; font-size: 1.2rem; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--rt-line); text-align: left; }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--rt-line); }
.nav-previous, .nav-next { color: var(--rt-muted); }
.nav-next { text-align: right; }
.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination a, .pagination span { min-width: 42px; padding: 8px 12px; border: 1px solid var(--rt-line); border-radius: 9px; text-align: center; }
.pagination .current { border-color: var(--rt-accent); background: var(--rt-accent); }

.site-footer { border-top: 1px solid var(--rt-line); background: #07090b; }
.footer-main { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 50px; padding: 58px 0 44px; }
.footer-main p { max-width: 460px; color: var(--rt-muted); font-size: .83rem; }
.footer-title { margin-bottom: 14px; color: #fff; font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 8px 0; }
.footer-links a { color: var(--rt-muted); font-size: .84rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding: 22px 0; border-top: 1px solid var(--rt-line); color: #77818c; font-size: .74rem; }
.risk-warning { max-width: 720px; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .dashboard-card { max-width: 680px; }
  .rules-grid, .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .manifesto { grid-template-columns: 1fr; gap: 36px; }
  .manifesto-quote { position: static; }
}

@media (max-width: 760px) {
  .rt-wrap { width: min(calc(100% - 28px), var(--rt-max)); }
  .header-inner { min-height: 68px; }
  .menu-toggle { display: grid; place-items: center; }
  .site-nav { display: none; position: absolute; inset: 68px 14px auto; padding: 16px; border: 1px solid var(--rt-line); border-radius: 16px; background: #11151a; box-shadow: var(--rt-shadow); }
  .site-nav.is-open { display: block; }
  .site-nav ul { align-items: stretch; flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 11px 12px; }
  .challenge-hero { padding: 45px 0 38px; }
  h1 { font-size: clamp(2.8rem, 15vw, 4.7rem); }
  .dashboard-card { padding: 23px; border-radius: 20px; }
  .dashboard-top { flex-direction: column; }
  .dashboard-goal { align-self: flex-start; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .mini-stat:last-child { grid-column: 1 / -1; }
  .trust-inner { grid-template-columns: 1fr; }
  .trust-item { padding: 18px 14px; border-right: 0; border-bottom: 1px solid var(--rt-line); }
  .trust-item:last-child { border-bottom: 0; }
  .section { padding: 68px 0; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .rules-grid, .posts-grid { grid-template-columns: 1fr; }
  .newsletter { grid-template-columns: 1fr; padding: 28px; }
  .footer-main { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; }
  .post-navigation { grid-template-columns: 1fr; }
  .nav-next { text-align: left; }
}

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