/* =======================
   GLOBAL
======================= */
body {
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
  transition: background-color .35s ease, color .35s ease;
}

main {
  padding-top: 4rem;
  padding-bottom: 6rem;
}

img {
  max-width: 100%;
  height: auto;
}

/* =======================
   LOGO & HEADER
======================= */
.logo-text {
  font-family: 'Montserrat', 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #1a1a1a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s ease;
  margin-left: 3%;
}

.logo-text:hover {
  color: rgb(0, 51, 255);
}

.logo-highlight {
  color: rgb(0, 51, 255);
  font-weight: 800;
  position: relative;
}

.logo-highlight::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: rgb(0, 51, 255);
  position: absolute;
  bottom: -4px;
  left: 0;
  border-radius: 2px;
}

header h1 {
  font-size: 2rem;
  letter-spacing: 1px;
  transition: color 0.3s;
}

header h1:hover {
  color: #0d6efd;
}

/* =======================
   INTRODUCTION
======================= */
.intro-pres {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  transition: color 0.3s, transform 0.3s;
}

.intro-pres:hover {
  color: #0d6efd;
  transform: translateY(-2px);
}

/* =======================
   BOUTONS
======================= */
.btn-outline-primary,
.btn-primary {
  border-radius: 50px;
  padding: 0.65rem 1.5rem;
  font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(13, 110, 253, 0.3);
}

.btn-outline-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(13, 110, 253, 0.15);
}

/* =======================
   PROFIL
======================= */
.profile-wrapper {
  position: relative;
  width: 200px;
  margin: auto;
  margin-bottom: 20%;
}

.profile-img,
.profile-img-chibi {
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.profile-img {
  opacity: 1;
}

.profile-img-chibi {
  opacity: 0;
}

.profile-wrapper:hover .profile-img {
  opacity: 0;
}

.profile-wrapper:hover .profile-img-chibi {
  opacity: 1;
  animation: glitch 0.25s linear;
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 2px); }
  40% { transform: translate(3px, -2px); }
  60% { transform: translate(-2px, 1px); }
  80% { transform: translate(2px, -1px); }
  100% { transform: translate(0); }
}

img.rounded-circle {
  transition: transform 0.4s, box-shadow 0.4s;
  cursor: pointer;
}

img.rounded-circle:hover {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* =======================
   PROJETS
======================= */
.project-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-radius: 16px;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

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

/* =======================
   COMPÉTENCES
======================= */
.skill-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.skill-badge {
  background: #f1f3f5;
  color: #333;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
}

/* =======================
   FOOTER
======================= */
.footer {
  background-color: #0d1117;
  color: #fff;
  position: relative;
}

.footer-chibi {
  position: absolute;
  bottom: 82%;
  right: 1rem;
  width: 10%;
  pointer-events: none;
}

.footer a {
  color: #1da1f2;
  text-decoration: none;
  transition: color .3s ease;
}

.footer a:hover {
  color: #0cf;
  text-decoration: underline;
}

/* =======================
   SWITCH THÈME
======================= */
.theme-switch {
  position: absolute;
  top: 25px;
  right: 25px;
}

.theme-switch input { display: none; }

.theme-switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  height: 32px;
  background: var(--bs-secondary-bg);
  border-radius: 50px;
  padding: 4px;
  cursor: pointer;
  position: relative;
  transition: all .3s ease;
}

.theme-switch-label::after {
  content: "";
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  position: absolute;
  left: 4px;
  transition: transform .3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.theme-switch input:checked + .theme-switch-label::after {
  transform: translateX(32px);
}

.theme-switch-label span {
  font-size: 14px;
  pointer-events: none;
}

.theme-switch-label:hover { transform: scale(1.05); }

/* =======================
   SOCIAL LINKS
======================= */
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f0f0f0;
  color: #333;
  transition: all 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px) scale(1.1);
  color: #fff;
}

.social-links a:nth-child(1):hover { background-color: #0a66c2; } /* LinkedIn */
.social-links a:nth-child(2):hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); } /* Insta */
.social-links a:nth-child(3):hover { background-color: #333; } /* GitHub */
.social-links a:nth-child(4):hover { background-color: #1f1f1f; } /* Twitter */

.social-links svg { width: 24px; height: 24px; }

/* =======================
   DIVERS / UTILITAIRES
======================= */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s, box-shadow 0.2s;
}

.back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(155, 155, 155, 0.3);
}

#portfolioCarousel {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.carousel-item img {
  transition: transform 0.5s;
}

.carousel-item img:hover {
  transform: scale(1.02);
}

.contact-chibi {
  width: 12%;
  margin-bottom: 1rem;
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 768px) {
  .intro-pres { font-size: 1rem; }

  .footer-chibi { width: 15%; bottom: auto; top: -50px; }
  .contact-chibi { width: 20%; }

  .footer .container { flex-direction: column; gap: 1rem; }
  .footer-right img { width: 60px; height: auto; }

  .profile-wrapper { width: 150px; margin-bottom: 10%; }

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

  .social-links a { width: 40px; height: 40px; }
}

@media (max-width: 480px) {
  .profile-wrapper { width: 120px; margin-bottom: 10%; }
  .project-card img { height: 150px; }
  .social-links a { width: 36px; height: 36px; }
}