/* =============== VARIABLES =============== */
:root {
  --primary: #6a11cb;
  --secondary: #2575fc;
  --accent: #ff416c;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #00c9a7;
  --warning: #ff9e00;
}

/* =============== BASE =============== */
* {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  color: var(--dark);
  line-height: 1.6;
}

/* =============== LOGO =============== */
.logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 10px;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(106, 17, 203, 0.3);
}

/* =============== HERO =============== */
.hero-section {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 4rem 1rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* =============== CAROUSEL =============== */
.project-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
}
@media (min-width: 768px) {
  .project-icon {
    margin: 0 2rem 0 0;
  }
}

.carousel-item .btn {
  border-radius: 8px;
}

/* =============== CARDS & BADGES =============== */
.card {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  background: white;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.badge {
  font-weight: 600;
  margin: 0.2rem;
}

/* =============== BOUTONS =============== */
.btn-primary {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  border: none;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

/* =============== ANIMATIONS =============== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* =============== DARK MODE =============== */
body.dark-mode {
  background: linear-gradient(135deg, #0f0f1b 0%, #1a1a2e 100%);
  color: #f0f0f0;
}

body.dark-mode .card,
body.dark-mode .feature-card {
  background: #1e1e2d;
  color: #f0f0f0;
  border: 1px solid #333;
}

body.dark-mode .navbar,
body.dark-mode footer {
  background: #0d0d1a !important;
}

body.dark-mode .navbar-brand span {
  background: linear-gradient(to right, #bb86fc, #03dac6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body.dark-mode .logo {
  background: linear-gradient(135deg, #bb86fc, #03dac6);
  box-shadow: 0 4px 12px rgba(187, 134, 252, 0.3);
}

body.dark-mode .bg-light {
  background-color: #1a1a2e !important;
}

/* =============== TOGGLE BUTTON =============== */
.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(15deg);
}

/* =============== FOOTER =============== */
footer {
  margin-top: auto;
}

/* ========== Styles spécifiques à la page À propos ========== */
.hero-about {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 5rem 1rem;
  text-align: center;
  border-radius: 0 0 40px 40px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hero-about::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.logo-large-about {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 20px;
  font-size: 3rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(106, 17, 203, 0.4);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.quote-box {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: white;
  padding: 3rem;
  border-radius: 20px;
  margin: 3rem 0;
  text-align: center;
  box-shadow: 0 10px 30px rgba(37, 117, 252, 0.3);
  position: relative;
  overflow: hidden;
}

.quote-box::after {
  content: "";
  position: absolute;
  top: -30px;
  right: 20px;
  font-size: 12rem;
  opacity: 0.1;
  font-family: serif;
}

/* ========== Timeline ========== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 2rem auto;
}

.timeline::after {
  content: "";
  position: absolute;
  width: 6px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  border-radius: 3px;
}

.timeline-item {
  padding: 20px 40px;
  position: relative;
  width: 50%;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.appear {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-content {
  padding: 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

body.dark-mode .timeline-content {
  background: #1e1e2d;
  color: #f0f0f0;
}

/* ========== Compétences ========== */
.skill-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

body.dark-mode .skill-card {
  background: #1e1e2d;
}

.skill-icon {
  width: 60px;
  height: 60px;
  transition: transform 0.4s ease;
}

.skill-card:hover .skill-icon {
  transform: rotate(15deg) scale(1.1);
}

/* ========== Fun Facts ========== */
.fun-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.fun-card {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border-top: 4px solid var(--accent);
}

.fun-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  border-top-color: var(--secondary);
}

body.dark-mode .fun-card {
  background: #1e1e2d;
}

.fun-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-bottom: 0.5rem;
}

/* ========== Philosophie ========== */
.philosophy-box {
  transition: transform 0.3s ease;
}

.philosophy-box:hover {
  transform: scale(1.01);
}

/* ========== Formulaire de contact ========== */
