/* ---------------------------------------------------
       TIMELINE DESHAIES – CSS ORIGINAL FIDÈLE
       --------------------------------------------------- */

:root {
  --tl-color-primary: #19568a;
  --tl-color-secondary: #c58a45;
  --tl-color-bg-card: #ffffff;
  --tl-color-line: #d2d7e0;
  --tl-color-text: #333333;
  --tl-color-text-light: #666666;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--tl-color-text);
}

/* Hero Header */
.dh-hero {
  background: linear-gradient(135deg, var(--tl-color-primary) 0%, #0d3a5c 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.dh-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.dh-hero .subtitle {
  font-size: 1.4rem;
  font-style: italic;
  color: var(--tl-color-secondary);
  margin-bottom: 15px;
}

.dh-hero p {
  max-width: 600px;
  margin: 0 auto 20px;
  opacity: 0.9;
}

.dh-hero blockquote {
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--tl-color-secondary);
  padding: 15px 25px;
  display: inline-block;
  border-radius: 0 8px 8px 0;
  margin: 20px 0 0;
}

.dh-hero blockquote p {
  font-style: italic;
  font-size: 1.2rem;
  margin: 0;
}

.dh-hero blockquote cite {
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Section Histoire */
.dh-history {
  padding: 60px 0;
}

.dh-history h2 {
  color: var(--tl-color-primary);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.epoch-badge {
  display: inline-block;
  background: var(--tl-color-primary);
  color: white;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Structure Timeline */
.dh-timeline {
  position: relative;
  padding: 40px 0;
}

.dh-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--tl-color-line);
  transform: translateX(-50%);
  z-index: 1;
}

/* Items */
.dh-timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 30px;
  box-sizing: border-box;
}

.dh-timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.dh-timeline-item:nth-child(even) {
  left: 50%;
}

/* Cartes */
.dh-timeline-content {
  background: var(--tl-color-bg-card);
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out,
    border 0.3s ease-out;
  border: 2px solid transparent;
}

/* Effet hover : encadrement */
.dh-timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 2px solid var(--tl-color-primary);
}

.dh-date {
  color: var(--tl-color-secondary);
  font-weight: 600;
  font-size: 1.1rem;
}

.dh-timeline-content h3 {
  color: var(--tl-color-text);
  font-size: 1.25rem;
  margin: 8px 0 12px;
}

.dh-timeline-content p {
  color: var(--tl-color-text-light);
  line-height: 1.7;
  margin: 0 0 10px;
}

.dh-timeline-content p:last-child {
  margin-bottom: 0;
}

.dh-timeline-content .highlight {
  background: #fef8f0;
  padding: 12px 16px;
  border-left: 3px solid var(--tl-color-secondary);
  border-radius: 0 8px 8px 0;
  margin-top: 15px;
  font-style: italic;
  color: var(--tl-color-text);
}

/* Icône / Point bleu */
.dh-icon {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  background: var(--tl-color-primary);
  border-radius: 50%;
  border: 5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  font-size: 1.1rem;
  z-index: 3;
  transition: transform 0.3s ease-out, background 0.3s ease-out;
}

.dh-timeline-item:hover .dh-icon {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--tl-color-secondary);
}

.dh-timeline-item:nth-child(odd) .dh-icon {
  left: 100%;
  transform: translate(-50%, -50%);
}

.dh-timeline-item:nth-child(even) .dh-icon {
  left: 0;
  transform: translate(-50%, -50%);
}

/* Section Étymologie */
.etymology-section {
  background: #f8f9fa;
  padding: 60px 0;
}

.etymology-card {
  background: white;
  border-radius: 14px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.etymology-card h3 {
  color: var(--tl-color-primary);
  margin-bottom: 15px;
}

.etymology-highlight {
  background: var(--tl-color-primary);
  color: white;
  padding: 25px 30px;
  border-radius: 14px;
  text-align: center;
  font-style: italic;
  font-size: 1.15rem;
}

/* Section Maires */
.maires-section {
  background: linear-gradient(135deg, #1a2332 0%, #2d3748 100%);
  color: white;
  padding: 60px 0;
}

.maires-section h2 {
  color: white;
}

.maires-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 30px;
}

.maire-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.maire-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.maire-card.premier {
  background: linear-gradient(135deg, var(--tl-color-secondary), #d4a574);
  grid-column: 1 / -1;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  padding: 25px;
}

.maire-date {
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.maire-name {
  font-weight: 600;
  font-size: 1.05rem;
}

.maire-card.premier .maire-name {
  font-size: 1.3rem;
}

.maire-card.premier .maire-title {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-top: 5px;
}

/* Footer */
.dh-footer {
  background: #1a2332;
  color: white;
  padding: 30px 0;
  text-align: center;
}

.dh-footer p {
  opacity: 0.7;
  margin: 5px 0;
}

.dh-footer .source {
  font-size: 0.85rem;
  opacity: 0.5;
  margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .dh-timeline::before {
    left: 25px;
  }

  .dh-timeline-item,
  .dh-timeline-item:nth-child(even),
  .dh-timeline-item:nth-child(odd) {
    width: 100%;
    left: 0;
    padding-left: 60px;
    padding-right: 15px;
    text-align: left;
    margin-bottom: 40px;
  }

  .dh-timeline-item:nth-child(odd) .dh-icon,
  .dh-timeline-item:nth-child(even) .dh-icon {
    left: 25px;
    transform: translate(-50%, -50%);
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .dh-timeline-item:hover .dh-icon {
    transform: translate(-50%, -50%) scale(1.1);
  }

  .dh-hero h1 {
    font-size: 1.8rem;
  }

  .maires-grid {
    grid-template-columns: 1fr;
  }

  .maire-card.premier {
    grid-column: 1;
  }
}
