/* ===== Variables ===== */
:root {
  --accent: #4a90d9;
  --accent-fonce: #3570b0;
  --accent-doux: rgba(74, 144, 217, 0.12);
  --sombre: #1a1a2e;
  --sombre-clair: #16213e;
}

/* ===== Base ===== */
body {
  font-family: "Lato", sans-serif;
  color: #333;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Lato", sans-serif;
}

.fw-900 {
  font-weight: 900;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-fonce);
}

/* ===== Accent utilities ===== */
.txt-accent {
  color: var(--accent) !important;
}

.bg-accent {
  background-color: var(--accent) !important;
}

.bg-accent-doux {
  background-color: var(--accent-doux) !important;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-fonce));
  color: #fff;
  border: none;
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-fonce), #2a5a8a);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 217, 0.4) !important;
}

.btn-accent-o {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-accent-o:hover {
  background-color: var(--accent);
  color: #fff;
}

/* ===== Section titles ===== */
.titre-section {
  font-weight: 900;
  position: relative;
  padding-bottom: 15px;
}

.titre-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-fonce));
  border-radius: 2px;
}

/* ===== Navbar ===== */
.navbar {
  transition: background-color 0.3s ease;
}

.navbar .nav-link {
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem !important;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent) !important;
}

/* ===== Hero ===== */
.accueil {
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    var(--sombre) 0%,
    var(--sombre-clair) 50%,
    var(--accent-fonce) 100%
  );
  position: relative;
  overflow: hidden;
}

.accueil::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(74, 144, 217, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.profil {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), #fff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profil img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.accueil h1 {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.accueil .lead {
  opacity: 0.9;
}

/* ===== Cards ===== */
.card {
  border-radius: 12px;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.survol:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}

/* ===== Info list ===== */
.infos li {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.infos li:last-child {
  border-bottom: none;
}

/* ===== Skill items ===== */
.competence {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

.competence:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.1);
  border-color: var(--accent) !important;
}

.comp-nom {
  flex-shrink: 0;
}

.comp-desc {
  line-height: 1.4;
}

@media (max-width: 575.98px) {
  .competence {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .comp-nom {
    margin-bottom: 4px !important;
  }.comp-desc {
    margin-bottom: 6px !important;
  }

  .badge-niv {
    align-self: flex-start;
    margin-left: 0 !important;
    margin-top: 4px;
  }
}

/* ===== Timeline ===== */
.chrono {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.chrono::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-fonce));
  border-radius: 2px;
}

.chrono-elem {
  position: relative;
  width: 50%;
  padding: 10px 40px 20px;
}

.chrono-g {
  left: 0;
  text-align: right;
}

.chrono-d {
  left: 50%;
}

.chrono-pt {
  position: absolute;
  top: 20px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--accent);
  z-index: 1;
}

.chrono-g .chrono-pt {
  right: -8px;
}

.chrono-d .chrono-pt {
  left: -8px;
}

.chrono-corps {
  position: relative;
}

.chrono-g .chrono-corps {
  text-align: left;
}

/* ===== Timeline responsive ===== */
@media (max-width: 767.98px) {
  .chrono::before {
    left: 20px;
  }

  .chrono-elem {
    width: 100%;
    left: 0 !important;
    padding-left: 50px;
    padding-right: 15px;
  }

  .chrono-g,
  .chrono-d {
    text-align: left;
  }

  .chrono-g .chrono-pt,
  .chrono-d .chrono-pt {
    left: 12px;
    right: auto;
  }
}

/* ===== Contact form ===== */
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem var(--accent-doux);
}

/* ===== Footer ===== */
footer a {
  text-decoration: none;
  transition: opacity 0.3s ease;
}

footer a:hover {
  opacity: 0.7;
}

/* ===== Scroll animation ===== */
.fondu {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fondu.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Badge styling ===== */
.badge {
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
}

/* ===== Smooth scroll offset for fixed navbar ===== */
section[id] {
  scroll-margin-top: 70px;
}

/* ===== Buttons transition ===== */
.btn {
  transition: all 0.3s ease;
}

/* ===== Badges de niveau ===== */
.badge-niv {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.niv-maitrise {
  background-color: #d4edda;
  color: #155724;
}

.niv-apprentissage {
  background-color: var(--accent-doux);
  color: var(--accent);
}

.niv-notions {
  background-color: #e9ecef;
  color: #6c757d;
}
