:root {
  --rtv-bg: #090d12;
  --rtv-bg-deep: #06090d;
  --rtv-panel: #111b29;
  --rtv-panel-strong: #19344d;
  --rtv-text: #f5f7fa;
  --rtv-muted: #b3bdc9;
  --rtv-accent: #9cdde1;
  --rtv-night: #0d1722;
  --rtv-light: #edf1f5;
  --rtv-border: #29333f;
  --rtv-content: 1180px;
  --rtv-reading: 900px;
  --rtv-radius: 20px;
  --rtv-shadow: 0 22px 70px rgba(0, 0, 0, .22);
}

html { scroll-behavior: smooth; }

body.rtv-v2-theme {
  margin: 0;
  background: var(--rtv-bg);
  color: var(--rtv-text);
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

.rtv-v2-theme *,
.rtv-v2-theme *::before,
.rtv-v2-theme *::after { box-sizing: border-box; }

.rtv-v2-theme img { max-width: 100%; height: auto; }
.rtv-v2-theme a { color: var(--rtv-accent); text-underline-offset: .2em; }
.rtv-v2-theme :focus-visible { outline: 3px solid var(--rtv-accent); outline-offset: 4px; }

.rtv-site-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: rgba(6, 9, 13, .94);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.rtv-site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: min(var(--rtv-content), 92%);
  min-height: 76px;
  margin: 0 auto;
}

.rtv-site-brand {
  color: #fff !important;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.025em;
  text-decoration: none;
  white-space: nowrap;
}

.rtv-primary-navigation { margin-left: auto; }
.rtv-nav-list { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.rtv-nav-list a { display: inline-flex; align-items: center; min-height: 44px; color: #d2dae4 !important; font-size: 14px; font-weight: 600; text-decoration: none; }
.rtv-nav-list a:hover { color: #fff !important; }
.rtv-nav-list .rtv-nav-cta a { justify-content: center; padding: 0 19px; background: #fff; color: #111827 !important; border-radius: 999px; }

.rtv-menu-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: transparent; color: #fff; cursor: pointer; }
.rtv-menu-toggle span { display: block; width: 19px; height: 2px; margin: 4px auto; background: currentColor; border-radius: 10px; transition: transform .2s ease, opacity .2s ease; }
.rtv-site-header.is-menu-open .rtv-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.rtv-site-header.is-menu-open .rtv-menu-toggle span:nth-child(2) { opacity: 0; }
.rtv-site-header.is-menu-open .rtv-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.rtv-main { width: min(var(--rtv-content), 92%); margin: 0 auto; padding: 72px 0 96px; }
.rtv-single-main { max-width: var(--rtv-reading); }
.rtv-entry-header { margin-bottom: 36px; }
.rtv-entry-title,
.rtv-archive-header h1 { margin: 0; color: var(--rtv-text); font-size: clamp(40px, 6vw, 72px); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; text-transform: none; }
.rtv-entry-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; color: var(--rtv-muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rtv-entry-meta a { color: var(--rtv-muted); }
.rtv-entry-featured { margin: 0 0 42px; }
.rtv-entry-featured img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--rtv-radius); box-shadow: var(--rtv-shadow); }

.rtv-entry-content { color: #c9d2dc; font-size: 18px; line-height: 1.78; }
.rtv-entry-content > * { max-width: 100%; }
.rtv-entry-content p,
.rtv-entry-content ul,
.rtv-entry-content ol { margin: 0 0 1.35em; }
.rtv-entry-content h2,
.rtv-entry-content h3 { color: var(--rtv-text); line-height: 1.2; letter-spacing: -.02em; }
.rtv-entry-content h2 { margin: 2em 0 .7em; font-size: clamp(28px, 4vw, 38px); }
.rtv-entry-content h3 { margin: 1.6em 0 .6em; font-size: clamp(22px, 3vw, 29px); }
.rtv-entry-content blockquote { margin: 2em 0; padding: 1.3em 1.5em; background: var(--rtv-panel); border-left: 4px solid var(--rtv-accent); border-radius: 0 14px 14px 0; }
.rtv-entry-content figure { margin: 2em 0; }
.rtv-entry-content figcaption { color: var(--rtv-muted); font-size: 14px; }

.rtv-entry-cta { margin-top: 72px; padding: clamp(28px, 5vw, 48px); background: linear-gradient(135deg, var(--rtv-panel), var(--rtv-panel-strong)); border: 1px solid rgba(255,255,255,.1); border-radius: var(--rtv-radius); }
.rtv-entry-cta h2 { margin: 0 0 12px; color: var(--rtv-text); font-size: clamp(28px, 4vw, 42px); }
.rtv-entry-cta p:not(.rtv-eyebrow) { max-width: 650px; color: #c9d2dc; }
.rtv-eyebrow { margin: 0 0 16px; color: var(--rtv-accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.rtv-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 12px; padding: 0 22px; background: #fff; color: #111827 !important; border-radius: 999px; font-weight: 800; text-decoration: none; }
.rtv-entry-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; color: var(--rtv-muted); font-size: 14px; }
.rtv-entry-tags a { padding: 6px 11px; background: var(--rtv-panel); border: 1px solid var(--rtv-border); border-radius: 999px; text-decoration: none; }
.rtv-post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--rtv-border); }
.rtv-post-navigation > div:last-child { text-align: right; }

.rtv-page-main { width: 100%; max-width: none; padding: 0; }
.rtv-page-header { width: min(var(--rtv-content), 92%); margin: 0 auto; padding: 72px 0 40px; }

.rtv-archive-header { max-width: 850px; margin-bottom: 48px; }
.rtv-archive-description { color: var(--rtv-muted); font-size: 18px; line-height: 1.7; }
.rtv-post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.rtv-post-card { overflow: hidden; background: var(--rtv-panel); border: 1px solid rgba(255,255,255,.08); border-radius: var(--rtv-radius); }
.rtv-post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--rtv-panel-strong); }
.rtv-post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.rtv-post-card:hover .rtv-post-card__media img { transform: scale(1.025); }
.rtv-post-card__placeholder { display: block; width: 100%; height: 100%; background: radial-gradient(circle at 80% 20%, rgba(133,215,255,.24), transparent 45%), var(--rtv-panel-strong); }
.rtv-post-card__body { padding: 26px; }
.rtv-post-card time { color: var(--rtv-muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rtv-post-card h2 { margin: 11px 0 14px; font-size: clamp(24px, 3vw, 34px); line-height: 1.15; }
.rtv-post-card h2 a { color: var(--rtv-text); text-decoration: none; }
.rtv-post-card__excerpt { color: #c9d2dc; line-height: 1.65; }
.rtv-text-link { display: inline-flex; gap: 8px; margin-top: 10px; font-weight: 700; text-decoration: none; }
.rtv-pagination { margin-top: 48px; }
.rtv-pagination .nav-links { display: flex; justify-content: center; gap: 8px; }
.rtv-pagination a,
.rtv-pagination .current { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--rtv-border); border-radius: 10px; text-decoration: none; }
.rtv-pagination .current { background: #fff; color: #111827; }

.rtv-search-header { max-width: 900px; margin-bottom: 48px; }
.rtv-search-header .rtv-entry-title { margin-bottom: 28px; }
.rtv-search-form { max-width: 720px; }
.rtv-search-form .search-form { display: flex; align-items: stretch; gap: 12px; }
.rtv-search-form label { flex: 1 1 auto; margin: 0; }
.rtv-search-form .search-field {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  background: var(--rtv-panel);
  color: var(--rtv-text);
  border: 1px solid var(--rtv-border);
  border-radius: 12px;
}
.rtv-search-form .search-field::placeholder { color: var(--rtv-muted); opacity: 1; }
.rtv-search-form .search-submit {
  min-height: 50px;
  padding: 0 22px;
  background: #fff;
  color: #111827;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.rtv-status-panel {
  max-width: 900px;
  padding: clamp(28px, 6vw, 56px);
  background: linear-gradient(135deg, var(--rtv-panel), var(--rtv-panel-strong));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--rtv-radius);
  box-shadow: var(--rtv-shadow);
}
.rtv-status-panel > p:not(.rtv-eyebrow) { max-width: 720px; color: #c9d2dc; font-size: 18px; line-height: 1.75; }
.rtv-status-panel h2 { color: var(--rtv-text); }
.rtv-status-panel--404 { margin: 24px auto 0; text-align: center; }
.rtv-status-panel--404 .rtv-entry-title { max-width: 760px; margin: 0 auto 24px; }
.rtv-status-panel--404 > p:not(.rtv-eyebrow) { margin-right: auto; margin-left: auto; }
.rtv-action-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 24px; margin-top: 28px; }
.rtv-action-list .rtv-button,
.rtv-action-list .rtv-text-link { margin-top: 0; }
.rtv-search-form--compact { margin: 44px auto 0; padding-top: 34px; border-top: 1px solid rgba(255,255,255,.12); text-align: left; }
.rtv-search-form--compact h2 { margin: 0 0 16px; font-size: 24px; }

.rtv-v2-theme .footer,
.rtv-v2-theme .footer-content,
.rtv-v2-theme .footer-bg-accent { background: var(--rtv-bg-deep) !important; color: var(--rtv-muted) !important; }
.rtv-v2-theme .footer-content { padding: 40px 0 !important; border-top: 1px solid rgba(255,255,255,.1); }
.rtv-v2-theme .footer-content > .gridContainer { width: min(var(--rtv-content), 92%) !important; max-width: var(--rtv-content) !important; margin: 0 auto !important; padding: 0 !important; }
.rtv-v2-theme .footer p,
.rtv-v2-theme .footer a,
.rtv-v2-theme .footer .fa { color: var(--rtv-muted) !important; }

/* Pont de migration : les en-têtes embarqués restent dans les contenus jusqu'à validation. */
.rtv-v2-theme .rtv-header,
.rtv-v2-theme .rtv-contact-header,
.rtv-v2-theme .rtv-shared-header { display: none !important; }
.rtv-v2-theme.single .rtv-restored-title { display: none !important; }
.rtv-v2-theme .rtv-btn-primary { color: #111827 !important; }

/* Le CSS additionnel historique force les archives ciblées à 100 % de largeur. */
body.rtv-v2-theme:is(.category-news, .category-prestations, .category-materiel) #page-content.rtv-main {
  width: min(var(--rtv-content), 92%) !important;
  max-width: var(--rtv-content) !important;
  margin-right: auto !important;
  margin-left: auto !important;
  padding: 72px 0 96px !important;
}

@media (max-width: 980px) {
  .rtv-site-header__inner { min-height: 66px; }
  .rtv-menu-toggle { display: block; flex: 0 0 44px; }
  .rtv-site-header.rtv-nav-ready .rtv-primary-navigation { display: none; position: absolute; top: 100%; left: -4.35%; right: -4.35%; padding: 16px 4.35% 22px; background: #0d1117; border-bottom: 1px solid var(--rtv-border); }
  .rtv-site-header.rtv-nav-ready.is-menu-open .rtv-primary-navigation { display: block; }
  .rtv-nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .rtv-nav-list li { width: 100%; }
  .rtv-nav-list a { display: flex; justify-content: center; width: 100%; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 16px; }
  .rtv-nav-list .rtv-nav-cta a { margin-top: 12px; border-bottom: 0; }
  .rtv-post-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .rtv-site-brand { font-size: 21px; }
  .rtv-main { padding: 42px 0 64px; }
  .rtv-entry-title,
  .rtv-archive-header h1 { font-size: clamp(36px, 11vw, 50px); }
  .rtv-entry-content { font-size: 17px; line-height: 1.72; }
  .rtv-entry-featured { margin-bottom: 30px; }
  .rtv-entry-cta { margin-top: 52px; padding: 26px; }
  .rtv-post-navigation { grid-template-columns: 1fr; }
  .rtv-post-navigation > div:last-child { text-align: left; }
  .rtv-search-form .search-form { flex-direction: column; }
  .rtv-search-form .search-submit { width: 100%; }
  .rtv-status-panel--404 { margin-top: 0; }
  .rtv-action-list { align-items: stretch; flex-direction: column; }
  .rtv-action-list a { justify-content: center; }
  body.rtv-v2-theme:is(.category-news, .category-prestations, .category-materiel) #page-content.rtv-main { padding: 42px 0 64px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* Composants communs issus des références Tech’N Prod et OBSBOT New York. */
.rtv-v2-theme .rtv-section { padding: clamp(52px, 7vw, 94px) 0; }
.rtv-v2-theme .rtv-section__inner { width: min(var(--rtv-content), 92%); margin-inline: auto; }
.rtv-v2-theme .rtv-section--dark { background: var(--rtv-night); color: var(--rtv-text); }
.rtv-v2-theme .rtv-section--light { background: var(--rtv-light); color: #162a36; }
.rtv-v2-theme .rtv-section--light h2,
.rtv-v2-theme .rtv-section--light h3 { color: #162a36; }
.rtv-v2-theme .rtv-section--light p { color: #425765; }
.rtv-v2-theme .rtv-section--light a { color: #126d7c; }
.rtv-v2-theme .rtv-article-rail { width: min(var(--rtv-content), 92%); margin: 60px auto; }
.rtv-v2-theme .rtv-article-rail__title { margin: 0 0 28px; color: inherit; font-size: clamp(27px, 3.4vw, 42px); }
.rtv-v2-theme .rtv-article-track { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.rtv-v2-theme .rtv-article-track .rtv-post-card { min-width: 0; }
.rtv-v2-theme .rtv-article-track .rtv-post-card h3 { margin: 11px 0 14px; font-size: clamp(20px, 2vw, 26px); line-height: 1.25; }
.rtv-v2-theme .rtv-article-track .rtv-post-card h3 a { color: var(--rtv-text); text-decoration: none; }
.rtv-v2-theme .rtv-site-footer { background: #06090d; border-top: 1px solid rgba(255,255,255,.12); }
.rtv-v2-theme .rtv-site-footer__inner { width: min(var(--rtv-content), 92%); margin: auto; padding: 48px 0; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.rtv-v2-theme .rtv-site-footer p { margin: 0; color: #c1ccd5; }
.rtv-v2-theme .rtv-site-footer a { color: #d6edf0; }
.rtv-v2-theme .rtv-site-footer__links { display: flex; flex-wrap: wrap; gap: 16px; }
@media (max-width: 980px) {
  .rtv-v2-theme .rtv-article-track { grid-auto-columns: minmax(265px, 70%); grid-auto-flow: column; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 15px; }
  .rtv-v2-theme .rtv-article-track > article { scroll-snap-align: start; }
}
@media (max-width: 620px) {
  .rtv-v2-theme .rtv-article-track { grid-auto-columns: minmax(250px, 88%); }
  .rtv-v2-theme .rtv-site-footer__inner { flex-direction: column; }
}
/* Navigations embarquées conservées en base, masquées uniquement sous V2. */
.rtv-v2-theme .tnp-masthead,
.rtv-v2-theme .tnp-story-nav { display: none !important; }

/* Editorial hero: avoid forcing the full-bleed Tech’N Prod feature into
   the 900px standard-article wrapper. Historic CSS remains in WordPress
   until the separate content migration has been tested. */
body.rtv-v2-theme.rtv-v2-editorial-hero .rtv-single-main {
  width: 100%;
  max-width: none;
  padding: 0 0 64px;
}
body.rtv-v2-theme.rtv-v2-editorial-hero .rtv-entry-content {
  width: 100%;
  max-width: none;
}
body.rtv-v2-theme.rtv-v2-editorial-hero .rtv-entry-cta,
body.rtv-v2-theme.rtv-v2-editorial-hero .rtv-post-navigation {
  width: min(900px, 92%);
  margin-left: auto;
  margin-right: auto;
}
/* Third legacy editorial layout: keep only the global V2 header visible. */
body.rtv-v2-theme .tnpa-nav { display: none !important; }
