/* =============================================
   SUBPAGE SHARED STYLES — MATÉO RAMET
   Dark Gaming Theme — All Secondary Pages
   ============================================= */

/* ===== Variables (same as portfolio.css) ===== */
:root {
  --bg-primary:    #08080f;
  --bg-secondary:  #0d0d1a;
  --bg-card:       #111121;
  --border:        rgba(124, 58, 237, 0.18);
  --border-hover:  rgba(168, 85, 247, 0.5);
  --accent:        #7c3aed;
  --accent-light:  #a855f7;
  --accent-glow:   rgba(124, 58, 237, 0.35);
  --cyan:          #06b6d4;
  --text-primary:  #e2e8f0;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;
  --font-heading:  'Orbitron', sans-serif;
  --font-body:     'Inter', sans-serif;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --transition:    all 0.35s var(--ease);
  --shadow-glow:   0 0 35px rgba(124, 58, 237, 0.3);
  --radius:        14px;
  --radius-sm:     8px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
strong { font-weight: 600; color: var(--text-primary); }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--accent), var(--cyan));
  border-radius: 3px;
}

/* ===== Accent ===== */
.accent { color: var(--accent-light); }

/* ===== HEADER ===== */
.sp-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  padding: 0.9rem 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(8, 8, 15, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: var(--transition);
}
.sp-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  transition: color 0.3s;
}
.sp-logo span { color: var(--accent-light); }
.sp-logo:hover { color: var(--accent-light); }

.sp-nav { display: flex; align-items: center; gap: 1.75rem; }
.sp-nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.sp-nav a::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transition: width 0.3s var(--ease);
}
.sp-nav a:hover { color: var(--text-primary); }
.sp-nav a.active { color: var(--accent-light); }
.sp-nav a:hover::after,
.sp-nav a.active::after { width: 100%; }

.sp-menu-btn {
  display: none;
  font-size: 1.7rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.3s;
  z-index: 1001;
}

/* ===== PAGE HERO BANNER ===== */
.page-banner {
  min-height: 28vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 7rem 6% 3rem;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 1;
}
.page-banner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 300px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--cyan), transparent);
  z-index: 1;
}
.page-banner-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 0;
  object-fit: cover;
  opacity: 0.35;
  pointer-events: none;
}
.page-banner-breadcrumb {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 2;
}
.page-banner-breadcrumb a {
  color: var(--accent-light);
  transition: color 0.3s;
}
.page-banner-breadcrumb a:hover { color: var(--cyan); }
.page-banner-breadcrumb span { margin: 0 0.4rem; }

.page-banner h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  position: relative;
  margin-bottom: 0.5rem;
  z-index: 2;
}
.page-banner p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 500px;
  line-height: 1.65;
  position: relative;
  z-index: 2;
}

/* ===== MAIN CONTENT ===== */
.sp-main {
  flex: 1;
  padding: 4rem 6% 5rem;
  max-width: 1150px;
  margin: 0 auto;
  width: 100%;
}

/* ===== Section Heading (in-page) ===== */
.sp-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 0.9rem;
}
.sp-heading::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 45px; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 2px;
}
.sp-heading.center { text-align: center; }
.sp-heading.center::after { left: 50%; transform: translateX(-50%); }

/* ===== Cards / Boxes ===== */
.sp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  transition: var(--transition);
  margin-bottom: 1.25rem;
}
.sp-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

/* ===== Tag Chips ===== */
.sp-tag {
  display: inline-block;
  font-size: 0.73rem;
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-light);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-weight: 500;
  margin: 0.2rem 0.2rem 0 0;
}

/* ===== Info Items ===== */
.sp-info-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.sp-info-item i { color: var(--accent-light); font-size: 1rem; }

/* ===== Expanded Accordion ===== */
.sp-accordion { margin-bottom: 0.85rem; }
.sp-accordion-btn {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
  text-align: left;
}
.sp-accordion-btn:hover {
  border-color: var(--border-hover);
  background: rgba(124, 58, 237, 0.06);
}
.sp-accordion-btn .acc-icon {
  color: var(--accent-light);
  font-size: 1.1rem;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.sp-accordion-btn.open .acc-icon { transform: rotate(45deg); }
.sp-accordion-content {
  display: none;
  background: rgba(17, 17, 33, 0.7);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 1.25rem 1.5rem;
}
.sp-accordion-content.open { display: block; }
.sp-accordion-content p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.75rem; }
.sp-accordion-content ul { list-style: none; padding: 0; }
.sp-accordion-content ul li {
  color: var(--text-secondary);
  font-size: 0.88rem;
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
}
.sp-accordion-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-light);
}
.sp-accordion-content img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin: 0.75rem 0;
  max-width: 60%;
}
.sp-accordion-content .section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 1rem 0 0.5rem;
}

/* ===== Article Grid (Projets, Veille) ===== */
.sp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.sp-article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.sp-article-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}
.sp-article-img {
  height: 180px;
  overflow: hidden;
}
.sp-article-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.sp-article-card:hover .sp-article-img img { transform: scale(1.05); }
.sp-article-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.sp-article-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}
.sp-article-body p {
  font-size: 0.855rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}
.sp-article-footer {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sp-article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  transition: var(--transition);
}
.sp-article-link:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--cyan);
}

/* ===== Timeline ===== */
.sp-timeline { position: relative; padding-left: 2rem; }
.sp-timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--cyan), transparent);
  border-radius: 2px;
}
.sp-timeline-item { position: relative; margin-bottom: 2rem; }
.sp-timeline-dot {
  position: absolute;
  left: -2rem; top: 16px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.7);
  transition: var(--transition);
}
.sp-timeline-item:hover .sp-timeline-dot {
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.7);
}
.sp-timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: var(--transition);
}
.sp-timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}
.sp-timeline-year {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.18rem 0.7rem;
  border-radius: 100px;
  margin-bottom: 0.6rem;
}
.sp-timeline-content h4 {
  font-size: 0.97rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.sp-timeline-content p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== Back button ===== */
.sp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  transition: var(--transition);
  margin-bottom: 2.5rem;
}
.sp-back-btn:hover {
  color: var(--accent-light);
  border-color: var(--accent-light);
}

/* ===== FOOTER ===== */
.sp-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 1.75rem 6%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
}
.sp-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.5rem;
}
.sp-footer-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s;
}
.sp-footer-links a:hover { color: var(--accent-light); }
.sp-footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.sp-footer-top {
  position: absolute;
  right: 6%; top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.sp-footer-top:hover {
  border-color: var(--accent-light);
  color: var(--accent-light);
  box-shadow: 0 0 18px rgba(124, 58, 237, 0.3);
  transform: translateY(calc(-50% - 3px));
}

/* ===== Section divider ===== */
.sp-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 3rem 0;
}

/* ===== Scroll Animations ===== */
.sp-animate {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.sp-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sp-menu-btn { display: block; }
  .sp-nav {
    position: fixed;
    top: 0; right: -100%;
    width: 260px; height: 100vh;
    background: rgba(10, 10, 18, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    gap: 2rem;
    transition: right 0.4s var(--ease);
    border-left: 1px solid var(--border);
    z-index: 999;
  }
  .sp-nav.open { right: 0; }
  .sp-nav a { font-size: 1rem; }
  .sp-main { padding: 3rem 5%; }
  .sp-accordion-content img { max-width: 100%; }
  .sp-footer-top { display: none; }
  .sp-footer { padding: 1.5rem 5%; }
}

@media (max-width: 520px) {
  .sp-grid { grid-template-columns: 1fr; }
  .page-banner { padding: 6rem 5% 2.5rem; }
}

/* ===== JS-driven menu ===== */

/* =============================================
   PROJECT DETAIL PAGE
   ============================================= */

/* Layout 2 colonnes */
.pd-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---- Colonne gauche ---- */
.pd-left {}

.pd-info-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.pd-info-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
}
.pd-info-box h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  line-height: 1.25;
}
.pd-info-box hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, var(--accent), transparent);
  margin-bottom: 1rem;
}
.pd-meta-list {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}
.pd-meta-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(124,58,237,0.08);
}
.pd-meta-list li:last-child { border-bottom: none; }
.pd-meta-list li i { color: var(--accent-light); font-size: 1rem; flex-shrink: 0; }
.pd-meta-list li strong { color: var(--text-primary); }

.pd-desc-box { margin-bottom: 1.5rem; }
.pd-desc-box h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.75rem;
}
.pd-desc-box p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.pd-desc-box p.subtitle {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* CTA Buttons */
.pd-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.pd-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.03em;
}
.pd-btn-primary {
  background: var(--accent);
  color: #fff;
}
.pd-btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124,58,237,0.4);
  color: #fff;
}
.pd-btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(6,182,212,0.4);
}
.pd-btn-outline:hover {
  background: rgba(6,182,212,0.1);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

/* ---- Colonne droite ---- */
.pd-right {}

/* Carousel */
.pd-carousel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}
.pd-carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.45s var(--ease);
}
.pd-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
}
.pd-carousel-slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #08080f;
  display: block;
}
.pd-carousel-slide img.contain {
  object-fit: contain;
}

.pd-carousel-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(8,8,15,0.7);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}
.pd-carousel-btn:hover {
  border-color: var(--accent-light);
  background: rgba(124,58,237,0.3);
}
.pd-carousel-btn.prev { left: 12px; }
.pd-carousel-btn.next { right: 12px; }

.pd-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem;
  background: var(--bg-card);
}
.pd-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}
.pd-dot.active {
  background: var(--accent-light);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(168,85,247,0.6);
}

/* Compétences */
.pd-skills-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}
.pd-skills-box h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pd-skills-box h4 i { color: var(--accent-light); }
.pd-skills-list { list-style: none; padding: 0; }
.pd-skills-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
  border-bottom: 1px solid rgba(124,58,237,0.07);
  line-height: 1.55;
}
.pd-skills-list li:last-child { border-bottom: none; }
.pd-skills-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-light);
}

/* Tags row under carousel */
.pd-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 960px) {
  .pd-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .pd-carousel-slide img { height: 280px; }
}
@media (max-width: 520px) {
  .pd-carousel-slide img { height: 220px; }
}
