/* ==========================================
   HISTOIRE DE L'INFORMATIQUE - mise en page
   ========================================== */
:root {
  --history-accent: #d0a16a;  /* beige-orangé pour la frise */
}

/* Wrapper général de la page (comme lexique-wrapper) */
.history-wrapper {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding: 0 var(--gap) var(--vspace);
  background: #B8CBD01A;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
}

/* ==========================================
   HEADER (repris du lexique)
   ========================================== */

.page-header {
  margin-block: 6px 14px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #709CA7 0%, #7A90A4 100%); 
  border: 1px solid #344D59;
  border-radius: 6px;

  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  text-align: center;
}

.page-header h1 {
  margin: 0 0 4px 0;
  line-height: 1.2;
  font-family: "EB Garamond", serif;
  font-size: clamp(1.5rem, 1.2vw + 1.2rem, 2.2rem);
  color: #e0e6ef;           /* un blanc légèrement grisé, plus “dense” */
}

.page-header h2 {
  margin: 0;
  font-family: "EB Garamond", serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.25;
  color: currentColor;
}

.page-header h3 {
  margin: 0;
  font-family: "EB Garamond", serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.25;
  color: #736657;                    /* ancien var(--lex-muted) */
  font-style: italic;
}

/* ==========================================
   TIMELINE 3 colonnes (date – texte – image)
   ========================================== */

.timeline {
  max-width: 100%;
  margin: 0 auto var(--vspace);
}

/* Un événement de la frise */
.event {
  display: grid;
  grid-template-columns: 120px 1fr 180px;
  gap: 12px 20px;              /* un peu moins d’espace entre les colonnes */
  padding: 8px 0 14px;         /* moins de blanc en haut et en bas */
  border-bottom: 1px solid var(--bordure);
  align-items: center;
}

/* Bloc date */
.event-date {
  justify-self: flex-start;
}

.event-year {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
 /* background: var(--accent-strong);*/
  background: #137C8B;  /* accent fort */
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  white-space: nowrap;      /* empêche le retour à la ligne dans 1995–2000 */
}

/* Texte */

.event-content {
  align-self: center;
  padding-left: 16px;
  border-left: 3px solid var(--history-accent);
  background: rgba(255, 255, 255, 0.4);  /* très léger voile */
  border-radius: 4px 0 0 4px;
}

.event-content h3 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
}

.event-content p {
  margin: 0;
}

.event-credit {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.8;
  margin-top: 4px;
}

/* Image */
.event-image {
  align-self: center;
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
}

.event-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;      /* à ajuster : 120, 140, 160… selon ton goût */
  object-fit: contain;    /* garde les proportions, sans recouper */
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0,0,0,0.18);
}

.event-image img {
  cursor: zoom-in;
}

.event-image figcaption {
  margin-top: 4px;
}

/* ==========================================
   TITRES DE PÉRIODE
   ========================================== */

.timeline-period {
  margin: 18px 0 10px;
  padding: 6px 14px;
  background: linear-gradient(
    135deg,
    #e3edf4 0%,
    #dde7f0 100%
  );
  border-left: 4px solid var(--history-accent);
  border-radius: 4px;

  display: flex;
  flex-wrap: wrap;           /* << permet le retour à la ligne propre */
  align-items: baseline;
  column-gap: 10px;
  row-gap: 4px;
}

.timeline-period h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #344D59;
  white-space: nowrap;        /* évite que la date se coupe en 2 */
}

.timeline-period p {
  margin: 0;
  font-size: 0.95rem;
  color: #344D59;
  opacity: 0.9;
}

.timeline-subsection {
  margin: 20px 0 8px 0;
  padding: 6px 14px;
  border-left: 4px solid var(--accent-strong);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 4px;
}

.timeline-subsection h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #344D59; /* bleu foncé présent dans votre palette */
  letter-spacing: 0.5px;
}


/* ==========================================
   LIGHTBOX HISTOIRE INFORMATIQUE
   ========================================== */

.history-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.history-lightbox.open {
  display: flex;
}

.history-lightbox img {
  max-width: min(90vw, 800px);
  max-height: 90vh;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  border-radius: 6px;
  background: #fff;
}

.history-lightbox-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 2rem;
  line-height: 1;
  border: none;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 4px 8px;
}

.history-lightbox-close:hover {
  color: #ffdd99;
}

/* Curseur de zoom sur les miniatures */
.event-image img {
  cursor: zoom-in;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 800px) {
  .event {
    grid-template-columns: 1fr;
  }

  .event-date {
    margin-bottom: 4px;
  }

  .event-image {
    max-width: 260px;
    justify-self: center;
  }
}
