/* Variables de personnalisation */
:root {
  --timeline-primary: #3a7ca5;
  --timeline-accent: #81c3d7;
  --timeline-background: #f8f9fa;
  --timeline-text: #2d3142;
}

/* Scroll smooth pour toute la page */
html {
  scroll-behavior: smooth;
}

/* Conteneur principal de la timeline */
.timeline-simple {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Chaque étape */
.timeline-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 15px;
}

/* Numéro de l'étape - maintenant cliquable */
.step-number {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--timeline-primary), var(--timeline-accent));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(58, 124, 165, 0.3);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Sécurisation couleurs & états du numéro (évite les règles qui recouvrent)
   Objectif:
   - Par défaut: chiffre blanc
   - Hover: chiffre doré (timeline-accent)
   - Sélectionné: chiffre doré + bulle blanche translucide
   Note: la sélection durable nécessite la classe .is-selected sur .timeline-step
--------------------------------------------------------------------------- */
.timeline-simple .step-number,
.timeline-simple .step-number:link,
.timeline-simple .step-number:visited {
  color: #fff !important;
}

.timeline-simple .step-number span {
  color: inherit !important;
}

.timeline-simple .timeline-step:hover .step-number {
  color: var(--timeline-accent) !important;
}

.timeline-simple .timeline-step.is-selected .step-number {
  background: rgba(255, 255, 255, 0.55) !important;
  color: var(--timeline-accent) !important;
  border: 1px solid rgba(0,0,0,0.06);
}

.timeline-simple .timeline-step.is-selected .step-number::after {
  width: 85%;
  height: 85%;
  background: rgba(255, 255, 255, 0.15);
}


/* Effet hover sur le cercle cliquable */
.step-number:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 25px rgba(58, 124, 165, 0.5);
  background: linear-gradient(135deg, #2c5f7a, #5fa8c7);
}

/* Effet actif lors du clic */
.step-number:active {
  transform: scale(1.05);
}

/* Indicateur visuel de cliquabilité */
.step-number::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease;
}

.step-number:hover::after {
  width: 80%;
  height: 80%;
}

/* Connecteur entre les étapes */
.step-connector {
  position: absolute;
  top: 30px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--timeline-primary), var(--timeline-accent));
  z-index: 1;
}

.step-connector.last {
  display: none;
}

/* Titre de l'étape */
.step-title {
  font-size: 1.2rem;
  color: var(--timeline-text);
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.3;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Description de l'étape */
.step-description {
  font-size: 0.95rem;
  color: #5f6368;
  line-height: 1.6;
  margin: 0;
}

/* Version tablette - 2 colonnes */
@media (max-width: 900px) {
  .timeline-simple {
    flex-wrap: wrap;
    gap: 40px 0;
  }

  .timeline-step {
    flex: 0 0 50%;
    margin-bottom: 30px;
  }

  .timeline-step:nth-child(1) .step-connector,
  .timeline-step:nth-child(3) .step-connector {
    width: 50%;
  }

  .timeline-step:nth-child(2) .step-connector,
  .timeline-step:nth-child(4) .step-connector {
    display: none;
  }

  .timeline-step:nth-child(3)::before,
  .timeline-step:nth-child(4)::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 40px;
    background: linear-gradient(to bottom, var(--timeline-primary), var(--timeline-accent));
  }
}

/* Smartphone : timeline verticale, alignement strict, sans lignes */
@media (max-width: 600px) {

  /* Conteneur : empilement + axe centré */
  .timeline-simple {
    display: flex;
    flex-direction: column;
    align-items: center;     /* clé : tous les blocs sur le même axe */
    justify-content: flex-start;
    gap: 26px;
    padding: 26px 15px;
  }

  /* Suppression TOTALE des connecteurs (desktop + essais précédents) */
  .timeline-step .step-connector {
    display: none !important;
  }
  .timeline-step::before,
  .timeline-step::after {
    content: none !important;
    display: none !important;
  }

  /* Bloc : largeur identique pour les 4, et centrage strict */
  .timeline-step {
    position: relative;
    width: 100%;
    max-width: 420px;        /* ajuste si besoin, mais identique pour tous */
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    text-align: center;
  }

  /* Cercle : centré, taille stable */
  .step-number {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
    margin: 0 auto 14px;
  }

  /* Texte : même “colonne” de composition pour éviter les dérives visuelles */
  .step-title,
  .step-description {
    max-width: 32ch;         /* clé : même largeur de texte dans chaque bloc */
    margin-left: auto;
    margin-right: auto;

    /* évite les coupures qui changent trop la silhouette des blocs */
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
  }

  /* Titre : pas de hauteur imposée, sinon ça décale l’ensemble */
  .step-title {
    min-height: auto;
  }

  /* Description : idem, on reste “naturel” */
  .step-description {
    font-size: 0.9rem;       /* garde si tu aimes le rendu actuel */
    line-height: 1.45;
  }
}
