:root {
  --primary-color: #4A90E2;
  --bg-color: #f4f7f6;
  --text-color: #333;
  --card-bg: #fff;
  --success: #2ecc71;
  --purple: #9b59b6;
  --gray: #bdc3c7;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  font-family: 'Inter', sans-serif;
  margin: 0;
  color: var(--text-color);
}

header {
    text-align: center;
    padding: 60px 20px 40px;
}
header h1 { margin: 0; font-weight: 800; color: #2c3e50; }
header p { color: #7f8c8d; margin-top: 10px; }

/* --- TIMELINE CONTAINER --- */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0;
}

/* La ligne verticale centrale */
.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background-color: #dfe6e9;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  border-radius: 3px;
}

/* --- CONTENEURS (Gauche et Droite) --- */
.container {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

/* Positionnement Gauche/Droite */
.left { left: 0; }
.right { left: 50%; }

/* Les points (Cercles) sur la ligne centrale */
.container::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px; /* Pour aligner sur la ligne centrale pour les éléments de gauche */
  background-color: white;
  border: 4px solid var(--primary-color);
  top: 25px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.2);
}

/* Ajustement du point pour les éléments de droite */
.right::after {
  left: -10px;
}

/* Flèches pointant vers la ligne */
.left::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 28px;
  width: 0;
  z-index: 1;
  right: 30px;
  border: medium solid white;
  border-width: 10px 0 10px 10px;
  border-color: transparent transparent transparent white;
}

.right::before {
  content: " ";
  height: 0;
  position: absolute;
  top: 28px;
  width: 0;
  z-index: 1;
  left: 30px;
  border: medium solid white;
  border-width: 10px 10px 10px 0;
  border-color: transparent white transparent transparent;
}

/* --- CARTES DE CONTENU --- */
.content {
  padding: 25px 30px;
  background-color: var(--card-bg);
  position: relative;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.content:hover {
    transform: translateY(-5px);
}

/* Styles spécifiques selon l'état */
.content.obtained { border-left: 5px solid var(--success); }
.content.pending { border-left: 5px solid var(--gray); }
.content.final { border-left: 5px solid var(--purple); background: #fdfaff; }

/* Modifier la couleur du point central selon l'état */
.left .content.obtained ~ .container::after, /* Astuce CSS avancée ou js nécessaire, on simplifie ci-dessous */
.container.left:has(.obtained)::after { border-color: var(--success); background: var(--success); }
.container.right:has(.pending)::after { border-color: var(--gray); background: white; }
.container.left:has(.final)::after { border-color: var(--purple); }


/* Typography & Elements interne */
.content h2 { margin: 10px 0 5px; font-size: 1.2rem; }
.provider { display: block; font-size: 0.85rem; color: #888; font-weight: 600; margin-bottom: 10px; text-transform: uppercase; }
.content p { font-size: 0.95rem; line-height: 1.5; color: #555; margin-bottom: 15px; }

.logo-box img { width: 50px; height: 50px; border-radius: 8px; float: right; margin-left: 15px; }

.date-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    background-color: var(--success);
}
.date-badge.future { background-color: var(--gray); color: #555; }
.date-badge.objective { background-color: var(--purple); }

.cert-link {
    display: inline-block;
    color: var(--success);
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- RESPONSIVE MOBILE (Max 600px) --- */
@media screen and (max-width: 600px) {
  /* La ligne se déplace à gauche */
  .timeline::after { left: 31px; }
  
  /* Les conteneurs prennent toute la largeur */
  .container { width: 100%; padding-left: 70px; padding-right: 25px; }
  
  /* Reset des flèches */
  .container::before { left: 60px; border: medium solid white; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent; }

  /* Repositionnement des points sur la ligne gauche */
  .left::after, .right::after { left: 21px; }
  
  /* Les éléments "droite" redeviennent comme ceux de gauche */
  .right { left: 0%; }
  
  /* Ajustement visuel */
  .logo-box img { width: 40px; height: 40px; }
}
/* Style du Slider */
.slider-wrapper {
    overflow: hidden;
    padding: 10px 0;
}

.badge-slider {
    display: flex;
    overflow-x: auto; /* Permet le scroll horizontal */
    gap: 15px;
    padding-bottom: 15px;
    scroll-snap-type: x mandatory; /* Effet d'aimant sur les badges */
    scrollbar-width: thin; /* Pour Firefox */
}

/* Personnalisation de la barre de défilement pour Chrome/Edge/Safari */
.badge-slider::-webkit-scrollbar {
    height: 6px;
}
.badge-slider::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.profile-badge {
    flex: 0 0 160px; /* Largeur fixe de chaque badge dans le slider */
    scroll-snap-align: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #eee;
    text-align: center;
}

.profile-badge img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 8px;
}

.badge-title {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    color: #333;
}