﻿/* Theme tokens (edit here to change the palette) */
:root {
  --theme-bg: #242423;
  --theme-surface: #333533;
  --theme-accent: #F5CB5C;
  --theme-text: #E8EDDF;
  --theme-muted: #CFDBD5;
  --theme-border: rgba(232, 237, 223, 0.12);
  --theme-gradient: linear-gradient(135deg, #333533 0%, #242423 100%);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bs-body-bg: var(--theme-bg);
  --bs-body-bg-rgb: 36, 36, 35;
  --bs-body-color: var(--theme-text);
  --bs-body-color-rgb: 232, 237, 223;
  --bs-link-color: var(--theme-accent);
  --bs-link-hover-color: #f7d77a;
  --bs-secondary-color: var(--theme-muted);
  --bs-tertiary-color: var(--theme-muted);
  --bs-border-color: var(--theme-border);
  --bs-card-bg: var(--theme-surface);
  --bs-card-color: var(--theme-text);
  --bs-card-border-color: var(--theme-border);
  --bs-secondary-bg: var(--theme-surface);
  --bs-tertiary-bg: var(--theme-surface);
  --bs-primary: var(--theme-accent);
  --bs-primary-rgb: 245, 203, 92;
}

html[data-theme="dark"] body {
  background: var(--theme-gradient);
  background-attachment: fixed;
  color: var(--theme-text);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main,
#corpPrincipale {
  flex: 1 0 auto;
}

html[data-theme="dark"] .link-body-emphasis {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .text-body-emphasis {
  color: var(--theme-text) !important;
}

html[data-theme="dark"] .nav-link {
  color: var(--theme-muted);
}

html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link:focus {
  color: var(--theme-accent);
}

html[data-theme="dark"] .nav-pills .nav-link.active,
html[data-theme="dark"] .nav-pills .show > .nav-link {
  color: #242423;
  background-color: var(--theme-accent);
  border-color: var(--theme-accent);
}

html[data-theme="dark"] .site-footer {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--theme-border);
  margin-top: auto !important;
}

html[data-theme="dark"] .site-footer .footer-brand {
  font-weight: 600;
  letter-spacing: 0.4px;
}

html[data-theme="dark"] .site-footer .footer-link {
  color: var(--theme-muted);
  text-decoration: none;
}

html[data-theme="dark"] .site-footer .footer-link:hover,
html[data-theme="dark"] .site-footer .footer-link:focus {
  color: var(--theme-accent);
  text-decoration: none;
}

html[data-theme="dark"] #about-email {
  color: var(--theme-text);
  text-decoration: none;
}

html[data-theme="dark"] #about-email:hover,
html[data-theme="dark"] #about-email:focus,
html[data-theme="dark"] #about-email:visited {
  color: var(--theme-text);
  text-decoration: none;
}

html[data-theme="dark"] #about-linkedin {
  color: var(--theme-text);
  text-decoration: none;
}

html[data-theme="dark"] #about-linkedin:hover,
html[data-theme="dark"] #about-linkedin:focus,
html[data-theme="dark"] #about-linkedin:visited {
  color: var(--theme-text);
  text-decoration: none;
}

html[data-theme="dark"] .btn-primary {
  background-color: var(--theme-accent);
  border-color: var(--theme-accent);
  color: #242423;
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus {
  background-color: #f7d77a;
  border-color: #f7d77a;
  color: #242423;
}

html[data-theme="dark"] .btn-outline-primary {
  color: var(--theme-accent);
  border-color: var(--theme-accent);
}

html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus {
  background-color: var(--theme-accent);
  color: #242423;
}

html[data-theme="dark"] .btn-outline-secondary {
  color: var(--theme-muted);
  border-color: var(--theme-muted);
}

html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-secondary:focus {
  background-color: var(--theme-muted);
  color: #242423;
}

html[data-theme="dark"] .card {
  background-color: var(--theme-surface);
  border-color: var(--theme-border);
}

html[data-theme="dark"] .carousel-caption {
  color: var(--theme-text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* Tech logos cloud */
.tech-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 14px;
  align-items: center;
  max-width: 560px;
}

.tech-cloud img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: filter 0.2s ease, transform 0.2s ease;
  justify-self: start;
}

.tech-cloud img:hover {
  filter: grayscale(0%) opacity(1);
  transform: translateY(-2px);
}

#photo img {
  border: 4px solid var(--theme-accent);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.35),
    0 0 0 6px rgba(232, 237, 223, 0.08);
}

.separation {
  height: 50px;
  width: 100%;
}

/* Carousel indicators and controls */
.carousel-indicators [data-bs-target] {
  background-color: var(--theme-accent) !important;
}

.carousel-indicators .active {
  background-color: var(--theme-text) !important;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: none;
  background-color: var(--theme-accent);
  border-radius: 50%;
  padding: 10px;
}

.project-card-img {
  height: 180px;
  object-fit: cover;
}

.blog-carousel-img {
  max-height: 420px;
  object-fit: cover;
}

.detail-carousel-img {
  max-height: 420px;
  object-fit: cover;
}

.skill-card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* Mobile menu (no JS) */
.mobile-menu {
  position: relative;
}

.mobile-menu > summary {
  list-style: none;
}

.mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.mobile-menu > summary::marker {
  content: "";
}

.mobile-menu__panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: min(320px, 80vw);
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  z-index: 1030;
}

.mobile-menu__panel .nav-link {
  padding: 0.25rem 0;
}
