/* ============================================================
   SP THEME — Dark App Design v1.2.0
   ============================================================ */

:root {
  --sp-bg:        #0d0f11;
  --sp-bg-1:      #111518;
  --sp-bg-2:      #1a1e22;
  --sp-bg-3:      #1f2428;
  --sp-border:    #1e2428;
  --sp-border-2:  #2a2f35;
  --sp-text:      #E9EBEC;
  --sp-text-2:    #8a9199;
  --sp-text-3:    #7d8990;
  --sp-orange:    #ff6310;
  --sp-orange-h:  #f66246;
  --sp-green:     #4caf50;
  --sp-blue:      #2196f3;
  --sp-purple:    #9c27b0;
  --sp-radius:    10px;
  --sp-radius-lg: 16px;
  --sp-shadow:    0 2px 12px rgba(0,0,0,.5);
  --sp-shadow-lg: 0 8px 32px rgba(0,0,0,.6);
  --sp-header-h:  62px;
  --sp-font:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sp-mono:      'JetBrains Mono', 'Fira Code', monospace;
}

/* ── BLOCKSY NUCLEAR KILL ─────────────────────────────────── */
#masthead,
#colophon,
.site-header,
.site-footer,
.ct-header,
.ct-header-builder,
.ct-footer,
.ct-footer-builder,
.blc-header,
.blc-footer,
[data-id="header"],
[data-id="footer"],
.blocksy-footer-widgets-area {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  opacity: 0 !important;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-family: var(--sp-font);
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body.sp-site {
  background: var(--sp-bg) !important;
  color: var(--sp-text) !important;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: var(--sp-header-h);
}

/* Links — exclut tous les composants boutiques/outils/spc-* */
body.sp-site a:not([class*="sp-btn"]):not([class*="spc-"]):not([class*="sp-tool"]):not([class*="sp-duel"]):not([class*="sp-rank"]):not([class*="sp-article"]):not([class*="sp-logo"]):not([class*="sp-tab"]):not([class*="spl-"]) {
  color: var(--sp-orange);
  text-decoration: none;
}
body.sp-site a:not([class*="sp-btn"]):not([class*="spc-"]):not([class*="spl-"]):hover { color: var(--sp-orange-h); }

body.sp-site img { max-width: 100%; height: auto; }

/* Masquer titres/hero Blocksy sur pages outils */
body.sp-site .entry-header,
body.sp-site .page-header,
body.sp-site .ct-page-title { display: none !important; }

/* Conteneur pleine largeur */
body.sp-site .site-main,
body.sp-site .ct-container,
body.sp-site .content-area,
body.sp-site .entry-content,
body.sp-site .page-content {
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* ── HEADER ───────────────────────────────────────────────── */
#sp-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--sp-header-h);
  background: rgba(13,15,17,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sp-border);
  transition: box-shadow .2s;
}
#sp-header.sp-header--scrolled { box-shadow: 0 2px 24px rgba(0,0,0,.7); }
#wpadminbar ~ #sp-header { top: 32px; }

.sp-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.sp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  flex-shrink: 0;
}
.sp-logo-icon { width: 30px; height: 30px; flex-shrink: 0; }
.sp-logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--sp-text) !important;
  letter-spacing: -.02em;
}
.sp-logo:hover .sp-logo-text { color: var(--sp-orange) !important; }

.sp-nav { margin-left: auto; }
.sp-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; }
.sp-nav a {
  display: block;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--sp-text-2) !important;
  text-decoration: none !important;
  transition: color .15s, background .15s;
}
.sp-nav a:hover,
.sp-nav a[aria-current="page"] { color: var(--sp-text) !important; background: var(--sp-bg-2); }
.sp-nav a[aria-current="page"] { color: var(--sp-orange) !important; }

.sp-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.sp-ham-bar { display: block; width: 22px; height: 2px; background: var(--sp-text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.sp-hamburger[aria-expanded="true"] .sp-ham-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sp-hamburger[aria-expanded="true"] .sp-ham-bar:nth-child(2) { opacity: 0; }
.sp-hamburger[aria-expanded="true"] .sp-ham-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#sp-mobile-nav {
  position: fixed;
  top: var(--sp-header-h);
  left: 0; right: 0;
  background: var(--sp-bg-1);
  border-bottom: 1px solid var(--sp-border);
  z-index: 999;
  transform: translateY(-110%);
  opacity: 0;
  transition: transform .25s ease, opacity .2s ease;
  pointer-events: none;
}
#sp-mobile-nav.sp-mobile-nav--open { transform: translateY(0); opacity: 1; pointer-events: auto; }
#sp-mobile-nav ul { list-style: none; padding: 8px 0; }
#sp-mobile-nav a { display: block; padding: 14px 24px; font-size: 1rem; font-weight: 500; color: var(--sp-text) !important; text-decoration: none !important; border-bottom: 1px solid var(--sp-border); }
#sp-mobile-nav li:last-child a { border-bottom: none; }
#sp-mobile-nav a:hover { background: var(--sp-bg-2); color: var(--sp-orange) !important; }

#sp-nav-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 998;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
#sp-nav-overlay.sp-overlay--active { opacity: 1; pointer-events: auto; }

/* ── BUTTONS ──────────────────────────────────────────────── */
.sp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  border: none;
  transition: background .15s, color .15s, border-color .15s, transform .1s;
  white-space: nowrap;
  line-height: 1.4;
}
.sp-btn:active { transform: scale(.97); }

.sp-btn--primary { background: var(--sp-orange) !important; color: #fff !important; }
.sp-btn--primary:hover { background: var(--sp-orange-h) !important; color: #fff !important; }

.sp-btn--ghost { background: transparent !important; border: 1.5px solid var(--sp-border-2); color: var(--sp-text) !important; }
.sp-btn--ghost:hover { border-color: var(--sp-orange); color: var(--sp-orange) !important; }

.sp-btn--lg { padding: 13px 28px; font-size: 1rem; }
.sp-btn--sm { padding: 6px 14px; font-size: .82rem; }

/* ── SECTIONS ─────────────────────────────────────────────── */
.sp-section { max-width: 1280px; margin: 0 auto; padding: 80px 24px; }
.sp-section + .sp-section { padding-top: 0; }

.sp-section-hd { margin-bottom: 40px; text-align: center; }
.sp-section-hd h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.sp-section-hd p { color: var(--sp-text-2); font-size: 1rem; }

.sp-section-more { margin-top: 36px; text-align: center; }

/* ── TABS ─────────────────────────────────────────────────── */
.sp-tabs-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.sp-tab-btn {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--sp-border-2);
  background: transparent;
  color: var(--sp-text-2);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.sp-tab-btn:hover { border-color: var(--sp-orange); color: var(--sp-text); }
.sp-tab-btn--active { border-color: var(--sp-orange); background: rgba(255,99,16,.12); color: var(--sp-orange); }

.sp-tab-panel { display: none; }
.sp-tab-panel--active { display: block; }

/* ── HERO ─────────────────────────────────────────────────── */
.sp-hero {
  border-bottom: 1px solid var(--sp-border);
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,99,16,.07) 0%, transparent 70%);
}
.sp-hero-inner { max-width: 860px; margin: 0 auto; padding: 96px 24px 80px; text-align: center; }
.sp-hero-badge {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: rgba(255,99,16,.1); border: 1px solid rgba(255,99,16,.25);
  color: var(--sp-orange); font-size: .8rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 24px;
}
.sp-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 20px;
  color: var(--sp-text);
}
.sp-hero-title em { font-style: normal; color: var(--sp-orange); }
.sp-hero-sub { font-size: 1.05rem; color: var(--sp-text-2); max-width: 560px; margin: 0 auto 36px; line-height: 1.7; }
.sp-hero-ctas { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.sp-hero-stats {
  display: inline-flex; align-items: center; justify-content: center; gap: 32px;
  padding: 20px 32px; background: var(--sp-bg-1); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg);
}
.sp-hero-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sp-hero-stat strong { font-size: 1.6rem; font-weight: 800; color: var(--sp-orange); line-height: 1; }
.sp-hero-stat span { font-size: .75rem; color: var(--sp-text-3); text-transform: uppercase; letter-spacing: .06em; }
.sp-hero-stat-sep { width: 1px; height: 32px; background: var(--sp-border-2); }

/* ── TOOLS GRID ───────────────────────────────────────────── */
.sp-tools-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.sp-tool-card {
  background: var(--sp-bg-1); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .2s, transform .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.sp-tool-card::before {
  content:''; position: absolute; top:0; left:0; right:0; height:3px;
  background: var(--tool-color,var(--sp-orange)); opacity:0; transition: opacity .2s;
}
.sp-tool-card:hover { border-color: var(--sp-border-2); transform: translateY(-2px); box-shadow: var(--sp-shadow-lg); }
.sp-tool-card:hover::before { opacity: 1; }
.sp-tool-icon { width:44px; height:44px; color: var(--tool-color,var(--sp-orange)); }
.sp-tool-icon svg { width:44px; height:44px; }
.sp-tool-card h3 { font-size: 1.05rem; font-weight: 700; }
.sp-tool-card p { font-size: .86rem; color: var(--sp-text-2); line-height: 1.6; flex:1; }
.sp-tool-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .86rem; font-weight: 600; color: var(--tool-color,var(--sp-orange)) !important;
  text-decoration: none !important; margin-top: 4px;
}
.sp-tool-cta svg { width:13px; height:13px; transition: transform .15s; }
.sp-tool-cta:hover svg { transform: translateX(3px); }

/* ── DUELS GRID ───────────────────────────────────────────── */
.sp-duels-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.sp-duel-card {
  background: var(--sp-bg-1); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg);
  padding: 18px; text-decoration: none !important; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, transform .2s;
}
.sp-duel-card:hover { border-color: var(--sp-orange); transform: translateY(-2px); }
.sp-duel-products { display: flex; align-items: center; gap: 10px; }
.sp-duel-prod { flex:1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }

/* Images normalisées — carré fixe object-fit:contain */
.sp-duel-img-wrap {
  width: 64px; height: 64px;
  flex-shrink: 0;
  background: var(--sp-bg-2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.sp-duel-img-wrap img {
  width: 56px; height: 56px;
  object-fit: contain;
  object-position: center;
}
.sp-duel-img-ph { font-size: 1.6rem; opacity: .3; }

.sp-duel-name { font-size: .76rem; font-weight: 600; color: var(--sp-text); line-height: 1.3; }
.sp-duel-score { font-size: .8rem; font-weight: 700; color: var(--sp-text-3); font-family: var(--sp-mono); }
.sp-duel-prod--winner .sp-duel-score { color: var(--sp-green); }

.sp-duel-vs {
  font-size: .7rem; font-weight: 800; color: var(--sp-text-3); letter-spacing: .08em;
  flex-shrink: 0; padding: 4px 8px; border: 1px solid var(--sp-border-2); border-radius: 4px;
}
.sp-duel-arrow { font-size: .78rem; color: var(--sp-text-3); text-align: center; transition: color .15s; }
.sp-duel-card:hover .sp-duel-arrow { color: var(--sp-orange); }

/* ── RANKING LIST ─────────────────────────────────────────── */
.sp-ranking-list { display: flex; flex-direction: column; gap: 8px; }
.sp-rank-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--sp-bg-1); border: 1px solid var(--sp-border); border-radius: var(--sp-radius);
  padding: 12px 18px; transition: border-color .2s;
}
.sp-rank-row:hover { border-color: var(--sp-border-2); }
.sp-rank-pos { width: 26px; font-size: .8rem; font-weight: 800; color: var(--sp-text-3); font-family: var(--sp-mono); flex-shrink:0; text-align:center; }
.sp-rank-row:nth-child(1) .sp-rank-pos { color: #ffd700; }
.sp-rank-row:nth-child(2) .sp-rank-pos { color: #c0c0c0; }
.sp-rank-row:nth-child(3) .sp-rank-pos { color: #cd7f32; }

.sp-rank-img-wrap {
  width: 48px; height: 48px; flex-shrink:0;
  background: var(--sp-bg-2); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sp-rank-img-wrap img { width: 40px; height: 40px; object-fit: contain; }

.sp-rank-info { flex:1; min-width:0; }
.sp-rank-info strong { display:block; font-size:.9rem; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.sp-rank-score { font-size:.95rem; font-weight:800; font-family:var(--sp-mono); flex-shrink:0; min-width:50px; text-align:right; }
.sp-rank-score small { font-size:.68rem; color:var(--sp-text-3); }
.sp-rank-price { font-size:.82rem; color:var(--sp-text-2); font-weight:600; min-width:65px; text-align:right; flex-shrink:0; }
.sp-rank-link {
  display:flex; align-items:center; justify-content:center;
  width:30px; height:30px; border-radius:6px; border:1px solid var(--sp-border-2);
  color:var(--sp-text-3); text-decoration:none !important; transition:border-color .15s,color .15s; flex-shrink:0;
}
.sp-rank-link svg { width:13px; height:13px; }
.sp-rank-link:hover { border-color:var(--sp-orange); color:var(--sp-orange) !important; }

/* ── ARTICLES GRID ────────────────────────────────────────── */
.sp-articles-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }

/* Premier article plus grand */
.sp-articles-grid .sp-article-card:first-child {
  grid-column: 1 / -1;
  flex-direction: row;
}
.sp-articles-grid .sp-article-card:first-child .sp-article-thumb {
  width: 360px;
  height: auto;
  min-height: 200px;
  flex-shrink: 0;
}

.sp-article-card {
  background: var(--sp-bg-1); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-lg);
  overflow: hidden; text-decoration: none !important; display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.sp-article-card:hover { border-color: var(--sp-orange); transform: translateY(-2px); }

.sp-article-thumb {
  height: 180px; background: var(--sp-bg-2) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sp-article-noimg { font-size: 2.5rem; opacity: .25; }

.sp-article-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex:1; }
.sp-article-cat { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--sp-orange); }
.sp-article-body h3 { font-size:.95rem; font-weight:700; line-height:1.4; color:var(--sp-text); }
.sp-article-excerpt { font-size:.82rem; color:var(--sp-text-2); line-height:1.5; flex:1; }
.sp-article-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:12px; border-top:1px solid var(--sp-border); }
.sp-article-footer time { font-size:.75rem; color:var(--sp-text-3); }
.sp-article-cta { font-size:.78rem; font-weight:600; color:var(--sp-orange); }

/* ── FOOTER ───────────────────────────────────────────────── */
#sp-footer { border-top: 1px solid var(--sp-border); background: var(--sp-bg-1); margin-top: 40px; }
.sp-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 56px 24px 36px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.sp-footer-brand .sp-logo { margin-bottom: 14px; }
.sp-logo--footer .sp-logo-text { font-size: 1.05rem; }
.sp-footer-tagline { font-size:.88rem; color:var(--sp-text-2); line-height:1.6; margin-bottom:10px; }
.sp-footer-powered { font-size:.76rem; color:var(--sp-text-3); }
.sp-footer-powered a { color:var(--sp-text-3) !important; }
.sp-footer-powered a:hover { color:var(--sp-orange) !important; }
.sp-footer-col h4 { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--sp-text-3); margin-bottom:14px; }
.sp-footer-col ul { list-style:none; }
.sp-footer-col li + li { margin-top:9px; }
.sp-footer-col a { font-size:.86rem; color:var(--sp-text-2) !important; text-decoration:none !important; transition:color .15s; }
.sp-footer-col a:hover { color:var(--sp-orange) !important; }
.sp-footer-bottom {
  max-width:1280px; margin:0 auto; padding:18px 24px;
  border-top:1px solid var(--sp-border); display:flex; align-items:center; gap:8px;
  font-size:.78rem; color:var(--sp-text-3);
}
.sp-footer-sep { opacity:.4; }

/* ── PAGES CONTENU (articles, about, contact) — PAS les outils ── */
body.sp-site:not(.sp-home):not(.sp-tool-page) .entry-content,
body.sp-site:not(.sp-home):not(.sp-tool-page) .page-content {
  max-width: 780px !important;
  margin: 0 auto !important;
  padding: 56px 24px 80px !important;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--sp-text);
}
body.sp-site:not(.sp-home):not(.sp-tool-page) .entry-content h2 { margin: 2em 0 .75em; font-size:1.4rem; }
body.sp-site:not(.sp-home):not(.sp-tool-page) .entry-content p { margin-bottom:1.2em; color:var(--sp-text-2); }

/* Pages d'outils — full width garanti */
body.sp-tool-page .entry-content,
body.sp-tool-page .page-content,
body.sp-tool-page .site-main,
body.sp-tool-page .ct-container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width:1100px) {
  .sp-tools-grid { grid-template-columns: repeat(2,1fr); }
  .sp-footer-inner { grid-template-columns: 1fr 1fr; row-gap:36px; }
  .sp-footer-brand { grid-column:1/-1; }
}
@media (max-width:900px) {
  .sp-duels-grid { grid-template-columns: repeat(2,1fr); }
  .sp-articles-grid { grid-template-columns: 1fr 1fr; }
  .sp-articles-grid .sp-article-card:first-child { grid-column:1/-1; flex-direction:column; }
  .sp-articles-grid .sp-article-card:first-child .sp-article-thumb { width:100%; height:220px; }
}
@media (max-width:768px) {
  .sp-nav { display:none; }
  .sp-hamburger { display:flex; }
  .sp-tools-grid { grid-template-columns:1fr; }
  .sp-section { padding:56px 16px; }
  .sp-hero-stats { flex-wrap:wrap; gap:20px; }
  .sp-hero-stat-sep { display:none; }
  .sp-rank-price { display:none; }
}
@media (max-width:600px) {
  .sp-duels-grid { grid-template-columns:1fr; }
  .sp-articles-grid { grid-template-columns:1fr; }
  .sp-footer-inner { grid-template-columns:1fr; gap:28px; }
  .sp-hero-ctas { flex-direction:column; align-items:stretch; text-align:center; }
}
