/**
 * Roadmap — d314.io v5
 * Préfixe rm- | Palette indigo | Plus Jakarta Sans + JetBrains Mono
 */

/* ============================================================
   FIX ELEMENTOR
   ============================================================ */
body.page-template-page-roadmap { padding-top: 0 !important; }
.rm-page { margin-top: 0 !important; }
.elementor,.elementor-section,.elementor-top-section,
.elementor-location-header ~ *,main,#content {
    margin-top: 0 !important; padding-top: 0 !important;
}

/* ============================================================
   BASE
   ============================================================ */
.rm-page {
    font-family: var(--font-family-primary);
    color: var(--text-primary); background: var(--bg-primary);
    overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
.rm-grid-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(99,102,241,.04) 1px,transparent 1px),
        linear-gradient(90deg,rgba(99,102,241,.04) 1px,transparent 1px);
    background-size: 50px 50px;
}
.rm-grad-top {
    position: fixed; top: 0; left: 0; width: 100%; height: 600px;
    z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse at top,rgba(99,102,241,.10),transparent 60%);
}

.rm-inner         { max-width: 1100px; margin: 0 auto; position: relative; z-index: 2; padding: 0 40px; }
.rm-inner--narrow { max-width: 680px;  margin: 0 auto; position: relative; z-index: 2; padding: 0 40px; }

.rm-label {
    font-family: var(--font-family-mono);
    font-size: 11px; font-weight: var(--font-weight-semibold); letter-spacing: .18em;
    text-transform: uppercase; color: var(--primary-hover);
}

/* GRADIENT TEXT */
.rm-gradient-text {
    background: linear-gradient(135deg,var(--primary-color) 0%,var(--accent-phys) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ANIMATIONS */
@keyframes rm-fadein { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
@keyframes rm-gi { 0%,100%{opacity:.18;transform:translateX(-50%) scale(1)} 50%{opacity:.28;transform:translateX(-50%) scale(1.08)} }
@keyframes rm-dot-pulse { 0%{box-shadow:0 0 0 0 rgba(99,102,241,.7)} 70%{box-shadow:0 0 0 8px rgba(99,102,241,0)} 100%{box-shadow:0 0 0 0 rgba(99,102,241,0)} }
@keyframes rm-progress { from{width:0;opacity:0} to{opacity:1} }

.rm-anim { opacity: 0; animation: rm-fadein .8s cubic-bezier(.4,0,.2,1) both; }
.rm-anim--d1 { animation-delay: .1s; }
.rm-anim--d2 { animation-delay: .2s; }
.rm-anim--d3 { animation-delay: .3s; }

.rm-reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.rm-reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   HERO
   ============================================================ */
.rm-hero {
    position: relative; min-height: 60vh; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 140px 40px 100px; overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.rm-hero-glow {
    position: absolute; width: 700px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle,var(--primary-color),transparent 70%);
    top: -200px; left: 50%; transform: translateX(-50%);
    opacity: .15; filter: blur(90px); pointer-events: none;
    animation: rm-gi 8s ease-in-out infinite;
}
.rm-grain { position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: .025; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 200px 200px; }

.rm-hero-content { position: relative; z-index: 10; text-align: center; max-width: 800px; }

.rm-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px 6px 10px;
    background: rgba(99,102,241,.10); border: 1px solid rgba(99,102,241,.28);
    border-radius: 20px; font-family: var(--font-family-mono);
    font-size: 11px; font-weight: var(--font-weight-semibold); letter-spacing: .08em; text-transform: uppercase;
    color: #a5b4fc; margin-bottom: 28px;
}
.rm-badge-dot { width: 7px; height: 7px; background: var(--primary-color); border-radius: 50%; animation: rm-dot-pulse 2.4s ease-out infinite; }

.rm-hero-title {
    font-size: clamp(38px,7vw,72px) !important; font-weight: var(--font-weight-extrabold) !important;
    line-height: 1.08 !important; letter-spacing: -.035em !important;
    color: var(--text-primary) !important; margin: 0 0 20px !important;
    background: none !important; -webkit-text-fill-color: var(--text-primary) !important;
}
.rm-hero-title .rm-gradient-text { -webkit-text-fill-color: transparent !important; }
.rm-hero-sub { font-size: clamp(15px,1.8vw,18px); color: var(--text-secondary); line-height: 1.65; max-width: 600px; margin: 0 auto; }

/* ============================================================
   PROGRESS
   ============================================================ */
.rm-progress-section {
    position: relative; z-index: 1;
    padding: 48px 0; background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.rm-progress-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.rm-progress-title {
    font-size: var(--font-size-sm); font-weight: var(--font-weight-bold); color: var(--text-primary);
    display: flex; align-items: center; gap: 10px;
}
.rm-progress-dot { width: 8px; height: 8px; background: var(--primary-color); border-radius: 50%; flex-shrink: 0; animation: rm-dot-pulse 2s ease-out infinite; }
.rm-progress-pct {
    font-family: var(--font-family-mono); font-size: 20px; font-weight: var(--font-weight-extrabold);
    color: var(--primary-hover); background: rgba(99,102,241,.10);
    border: 1px solid rgba(99,102,241,.2); border-radius: 8px; padding: 6px 16px;
}
.rm-progress-bar {
    width: 100%; height: 6px; background: rgba(255,255,255,.05);
    border-radius: 3px; overflow: hidden; border: 1px solid rgba(255,255,255,.06);
}
.rm-progress-fill {
    height: 100%; border-radius: 3px; width: 15%;
    background: linear-gradient(90deg,var(--primary-color),var(--primary-hover));
    animation: rm-progress 2s ease forwards;
}

/* ============================================================
   FILTRES
   ============================================================ */
.rm-filters-wrap { padding-top: 48px; padding-bottom: 48px; }
.rm-filters { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.rm-filter {
    all: unset !important; cursor: pointer !important;
    font-family: var(--font-family-mono) !important;
    font-size: 12px !important; font-weight: var(--font-weight-semibold) !important;
    padding: 9px 20px !important; border-radius: 20px !important;
    color: var(--text-muted) !important; border: 1px solid rgba(255,255,255,.06) !important;
    background: transparent !important;
    transition: all .15s !important; box-sizing: border-box !important;
    letter-spacing: .04em;
}
.rm-filter:hover { color: var(--text-primary) !important; border-color: rgba(255,255,255,.14) !important; }
.rm-filter.active { color: #a5b4fc !important; background: rgba(99,102,241,.12) !important; border-color: rgba(99,102,241,.3) !important; }

/* ============================================================
   TIMELINE
   ============================================================ */
.rm-timeline-section { position: relative; z-index: 1; padding-bottom: 80px; }

.rm-timeline-wrap { position: relative; padding: 40px 0; }
.rm-tl-line {
    position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(to bottom,var(--primary-color) 0%,rgba(99,102,241,.15) 100%);
    transform: translateX(-50%); z-index: 0;
}

/* YEAR MARKERS */
.rm-year-marker { position: relative; text-align: center; margin: 72px 0; z-index: 10; }
.rm-year-badge {
    display: inline-block;
    background: var(--bg-primary); border: 2px solid var(--primary-color); border-radius: 40px;
    padding: 12px 36px; font-family: var(--font-family-mono);
    font-size: clamp(22px,4vw,32px); font-weight: var(--font-weight-extrabold); color: var(--primary-hover);
    position: relative; z-index: 20;
    box-shadow: 0 0 40px rgba(99,102,241,.2);
}
.rm-year-badge--future { border-color: rgba(99,102,241,.3); color: #475569; }

/* ITEMS */
.rm-tl-item {
    position: relative; margin: 48px 0;
    display: flex; align-items: flex-start; z-index: 5;
    opacity: 0; transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease;
}
.rm-tl-item.visible { opacity: 1; transform: translateY(0); }
.rm-tl-item--left  { justify-content: flex-start;  padding-right: 52%; }
.rm-tl-item--right { justify-content: flex-end;    padding-left: 52%;  }

/* DOTS */
.rm-tl-dot {
    position: absolute; left: 50%; top: 18px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--bg-primary); border: 2px solid var(--primary-color);
    transform: translateX(-50%); z-index: 10;
    transition: transform .2s, box-shadow .2s;
}
.rm-tl-dot--highlight {
    width: 18px; height: 18px;
    background: var(--primary-color); border-color: var(--primary-color);
    box-shadow: 0 0 0 5px rgba(99,102,241,.18), 0 0 20px rgba(99,102,241,.4);
    animation: rm-dot-pulse 2.4s ease-out infinite;
}
.rm-tl-dot--phys { border-color: var(--accent-phys); }
.rm-tl-item:hover .rm-tl-dot { transform: translateX(-50%) scale(1.3); box-shadow: 0 0 20px rgba(99,102,241,.5); }

/* CARDS */
.rm-tl-card {
    background: var(--surface-card); border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px; padding: 28px 32px; margin: 0 32px;
    position: relative; overflow: hidden;
    transition: border-color .2s, transform .2s, background .2s;
}
.rm-tl-card::before { content:''; position:absolute; top:0; left:0; right:0; height:2px; background:linear-gradient(90deg,var(--cc,var(--primary-color)),transparent); }
.rm-tl-card:hover { border-color: rgba(99,102,241,.25); transform: translateY(-3px); background: #21213a; }
.rm-tl-card--future { opacity: .55; }

.rm-tl-card--math    { --cc: var(--primary-color); }
.rm-tl-card--physics { --cc: var(--accent-phys); }
.rm-tl-card--feature { --cc: var(--success-color); }

/* DATE BADGES */
.rm-tl-date {
    display: inline-block; font-family: var(--font-family-mono);
    font-size: 11px; font-weight: var(--font-weight-bold); letter-spacing: .06em;
    padding: 4px 12px; border-radius: 12px; margin-bottom: 14px;
    background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.2); color: var(--primary-hover);
}
.rm-tl-date--highlight { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.35); color: #a5b4fc; }
.rm-tl-date--feature   { background: rgba(16,185,129,.10);  border-color: rgba(16,185,129,.25); color: var(--success-color); }
.rm-tl-date--physics   { background: rgba(34,211,238,.10);  border-color: rgba(34,211,238,.25); color: var(--accent-phys); }

.rm-tl-title { font-size: 17px; font-weight: var(--font-weight-extrabold); color: var(--text-primary); margin-bottom: 10px; letter-spacing: -.02em; }
.rm-tl-desc  { font-size: var(--font-size-md); color: var(--text-secondary); line-height: 1.65; margin-bottom: 18px; }

/* CHIPS */
.rm-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.rm-chip {
    font-family: var(--font-family-mono); font-size: 11px; font-weight: var(--font-weight-semibold);
    padding: 4px 11px; border-radius: 10px;
    background: rgba(99,102,241,.08); border: 1px solid rgba(99,102,241,.18); color: var(--primary-hover);
    transition: background .15s, border-color .15s;
}
.rm-chip:hover { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.3); }
.rm-chip--phys { background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.18); color: var(--accent-phys); }
.rm-chip--phys:hover { background: rgba(34,211,238,.15); }

/* STATS */
.rm-tl-stats {
    display: flex; gap: 24px; flex-wrap: wrap;
    padding-top: 16px; border-top: 1px solid rgba(255,255,255,.05);
}
.rm-tl-stat { display: flex; align-items: center; gap: 8px; font-family: var(--font-family-mono); font-size: 12px; font-weight: var(--font-weight-semibold); color: var(--text-muted); }
.rm-tl-stat-ico { font-size: 11px; color: var(--primary-color); }

/* ============================================================
   LÉGENDE
   ============================================================ */
.rm-legend {
    position: relative; z-index: 1;
    padding: 80px 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255,255,255,.06);
}
.rm-legend-title {
    font-size: clamp(22px,3vw,34px); font-weight: var(--font-weight-extrabold);
    color: var(--text-primary); letter-spacing: -.025em;
    text-align: center; margin-bottom: 48px;
}
.rm-legend-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.rm-legend-item {
    background: var(--surface-card); border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px; padding: 28px 24px; text-align: center;
    transition: border-color .2s, transform .2s;
}
.rm-legend-item:hover { border-color: rgba(99,102,241,.2); transform: translateY(-2px); }
.rm-legend-ico {
    width: 48px; height: 48px; border-radius: 12px; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-family-mono); font-size: var(--text-medium); font-weight: var(--font-weight-extrabold);
}
.rm-legend-ico--math { background: rgba(99,102,241,.15); color: var(--primary-hover); }
.rm-legend-ico--phys { background: rgba(34,211,238,.15);  color: var(--accent-phys); }
.rm-legend-ico--feat { background: rgba(16,185,129,.15);  color: var(--success-color); }
.rm-legend-ico--comm { background: rgba(245,158,11,.15);  color: var(--warning-color); }
.rm-legend-lbl  { font-size: var(--font-size-md); font-weight: var(--font-weight-bold); color: var(--text-primary); margin-bottom: 8px; }
.rm-legend-desc { font-size: 12.5px; color: var(--text-muted); line-height: var(--lh-loose); }

/* ============================================================
   NEWSLETTER
   ============================================================ */
.rm-newsletter {
    position: relative; z-index: 1;
    padding: 100px 0;
    background: var(--bg-primary);
    border-top: 1px solid rgba(255,255,255,.06);
    overflow: hidden; text-align: center;
}
.rm-newsletter-glow { position: absolute; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle,rgba(99,102,241,.12),transparent 70%); top: 50%; left: 50%; transform: translate(-50%,-50%); filter: blur(60px); pointer-events: none; z-index: 0; }
.rm-newsletter-inner { position: relative; z-index: 2; }
.rm-newsletter-title { font-size: clamp(24px,4vw,40px); font-weight: var(--font-weight-extrabold); color: var(--text-primary); letter-spacing: -.03em; margin-bottom: 14px; }
.rm-newsletter-sub   { font-size: var(--text-base); color: var(--text-secondary); line-height: var(--lh-loose); margin-bottom: 36px; }
.rm-newsletter-form  { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.rm-newsletter-input {
    all: unset !important; flex: 1 !important; box-sizing: border-box !important;
    padding: 13px 18px !important; background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.08) !important; border-radius: 9px !important;
    color: var(--text-primary) !important; font-family: var(--font-family-primary) !important;
    font-size: var(--font-size-md) !important; transition: border-color .2s !important;
}
.rm-newsletter-input:focus { border-color: rgba(99,102,241,.4) !important; background: rgba(99,102,241,.06) !important; }
.rm-newsletter-input::placeholder { color: #475569 !important; }
.rm-newsletter-btn { flex-shrink: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .rm-tl-line  { left: 32px; transform: none; }
    .rm-tl-dot   { left: 32px; transform: translateX(-50%); }
    .rm-tl-item--left, .rm-tl-item--right { padding-left: 72px !important; padding-right: 0 !important; justify-content: flex-start; }
    .rm-year-marker { text-align: left; padding-left: 72px; }
    .rm-tl-card { margin: 0; }
    .rm-legend-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
    .rm-hero { padding: 100px 24px 72px; min-height: auto; }
    .rm-inner,.rm-inner--narrow { padding: 0 24px; }
    .rm-filters { gap: 6px; }
    .rm-filter { padding: 7px 14px !important; font-size: 11px !important; }
    .rm-tl-card { padding: 20px 22px; }
    .rm-tl-stats { gap: 14px; }
    .rm-legend-grid { grid-template-columns: 1fr; }
    .rm-newsletter-form { flex-direction: column; }
    .rm-newsletter-btn { justify-content: center !important; }
}
@media (max-width: 480px) {
    .rm-hero { padding: 90px 20px 60px; }
    .rm-inner,.rm-inner--narrow { padding: 0 20px; }
    .rm-tl-line { left: 16px; }
    .rm-tl-dot  { left: 16px; }
    .rm-tl-item--left, .rm-tl-item--right { padding-left: 44px !important; }
    .rm-year-marker { padding-left: 44px; }
}