/* ============================================================
   about.css — Styles page About v1.2
   Impact Communication
   ============================================================
   Sections :
   1. Hero About
   2. Key Figures
   3. History / Timeline
   4. Our Expertise (grille 6 cartes avec hover)
   5. Dark mode
   6. Responsive
============================================================ */

/* ============================================================
   1. HERO ABOUT
============================================================ */
.hero-about {
  padding: 140px 0 80px;
}

.hero-about-title-section{
  position: relative;
}

.hero-about .section-badge{
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-about-title-section:after{
  content: '';
  position: absolute;
  width: 50%;
  bottom: 12px;
  left: 0;
  height: 1px;
  background: rgba(0, 0, 0, .3);
}

.hero-about-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-black);
}

.hero-about-body p {
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.85;
  color: var(--color-black);
  margin-bottom: 1rem;
}
.hero-about-body p strong{
  font-weight: 700;
}

.hero-about-body strong {
  font-weight: 700;
  color: var(--color-black);
}

.hero-about-signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-black);
  margin-top: 1.5rem;
  font-weight: 700;
  display: block;
}

/* ============================================================
   KEY FIGURES v2 — Centré + grandes cartes style maquette
============================================================ */
.key-figures {
  padding: 70px 0 80px;
}

/* Header centré */
.key-figures-header {
  max-width: 900px;
  margin: 0 auto;
}

.key-figures-header .section-badge{
  margin: 0 auto;
}

.key-figures-header .section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-black);
  margin: 1rem 0 0;
}

/* Grille 4 colonnes */
.kf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

/* Carte : TOUTES avec bordure au départ */
.kf-card {
  background: var(--color-white);
  border: 0.5px solid var(--color-gray-300);
  padding: 2.5rem 1.5rem;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  border-radius: 2px;
  cursor: default;
  transition: background 0.35s cubic-bezier(.25,.46,.45,.94),
              border-color 0.35s ease,
              transform 0.35s ease,
              box-shadow 0.35s ease;
}

/* ★ HOVER : carte devient ROUGE, texte en blanc ★ */
.kf-card:hover {
  background: linear-gradient(135deg, #b70404 0%, #8e0404 100%);
  border-color: var(--color-red);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.25);
}

/* Chiffre */
.kf-number {
  font-family: var(--font-micro);
  font-size: clamp(3rem, 5vw, 4rem);
  font-weight: var(--fw-xlight);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-black);
  margin: auto 0;
  transition: color 0.35s ease;
}

.kf-card:hover .kf-number {
  color: white;
}

/* Label */
.kf-label {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-black);
  margin-bottom: 0;
  transition: color 0.35s ease;
  height: 70px;
}

.kf-card:hover .kf-label {
  color: rgba(255, 255, 255, 0.95);
}

/* Responsive */
@media (max-width: 992px) {
  .kf-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

@media (max-width: 576px) {
  .kf-grid { grid-template-columns: 1fr; }
  .kf-card { aspect-ratio: auto; padding: 2rem 1.5rem; }
}

/* Dark mode */
body.dark-mode .kf-card {
  background: #111;
  border-color: #333;
}

body.dark-mode .kf-card:hover {
  background: var(--color-red);
  border-color: var(--color-red);
}

body.dark-mode .kf-number {
  color: #F0F0EC;
}

body.dark-mode .kf-card:hover .kf-number {
  color: white;
}

body.dark-mode .kf-label {
  color: #999;
}

body.dark-mode .kf-card:hover .kf-label {
  color: rgba(255, 255, 255, 0.95);
}

/* ============================================================
   HISTORY / TIMELINE v2 — Centré + 3 colonnes + ligne verticale
============================================================ */
.history-section {
  padding: 70px 0 80px;
}

.history-header {
  max-width: 900px;
  margin: 0 auto;
}

.history-header .section-badge {
  margin: 0 auto;
}

.history-header .section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-black);
  margin: 1rem 0 0;
}

/* Layout 3 colonnes : Dates | Axe vertical | Contenu */
.history-layout {
  display: grid;
  grid-template-columns: 1fr auto 1.8fr;
  gap: 3rem;
  align-items: start;
  max-width: 1200px;
  margin: 3rem auto 0;
}

/* ─────────────────────────────
   COLONNE 1 : DATES cliquables
───────────────────────────── */
.history-dates {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0;
  align-self: center;
  flex-wrap: wrap;
  height: 120px;
}

.tl-item {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: all 0.3s ease;
  opacity: 0.4;
}

.tl-item:hover { opacity: 0.7; }

.tl-item.active { opacity: 1; }

.tl-dash {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-gray-400);
  transition: color 0.3s ease;
}

.tl-item.active .tl-dash {
  color: var(--color-red);
}

.tl-year {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  transition: color 0.3s ease;
}

.tl-item.active .tl-year {
  color: var(--color-black);
}

/* ─────────────────────────────
   COLONNE 2 : Axe vertical + gros dot
───────────────────────────── */
.history-axis {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: end;          /* ← pousse tout le contenu à droite */
  gap: 1.5rem;
  min-height: 240px;
  position: relative;
  width: 200px;
}

/* Label italique à gauche du dot */
.axis-label {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  padding-right: 0.5rem;
}

.axis-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-gray-500);
  font-weight: 400;
}

.axis-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-black);
  line-height: 1.2;
}

.axis-year {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-gray-500);
  font-weight: 400;
}

/* Ligne verticale */
.axis-line {
  position: relative;
  width: 1px;
  height: 240px;
  background: var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Gros dot rouge positionné sur la ligne */
.axis-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-red);
  box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.12);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: top 0.5s cubic-bezier(.25,.46,.45,.94);
}

/* Positions du dot selon la période active */
.history-axis[data-active="0"] .axis-dot { top: 50%; }
.history-axis[data-active="1"] .axis-dot { top: 50%; }
.history-axis[data-active="2"] .axis-dot { top: 50%; }

/* ─────────────────────────────
   COLONNE 3 : Contenu détaillé
───────────────────────────── */
.history-content {
  padding-top: 0.5rem;
}

.timeline-content-panel {
  min-height: 240px;
}

.timeline-content-panel .tl-period {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-red);
  margin-bottom: 1rem;
}

.timeline-content-panel .tl-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.25;
  color: var(--color-black);
  margin-bottom: .5rem;
}

.timeline-content-panel .tl-body {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--color-black);
  margin: 0;
}

.timeline-content-panel .tl-body strong{
  font-weight: 700;
}

/* ─────────────────────────────
   Dark mode
───────────────────────────── */
body.dark-mode .history-section           { border-color: #222; }
body.dark-mode .history-header .section-title { color: #F0F0EC; }
body.dark-mode .tl-item.active .tl-year   { color: #F0F0EC; }
body.dark-mode .axis-line                 { background: #333; }
body.dark-mode .axis-title                { color: #F0F0EC; }
body.dark-mode .timeline-content-panel .tl-title { color: #F0F0EC; }

/* ─────────────────────────────
   Responsive
───────────────────────────── */
@media (max-width: 992px) {
  .history-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .history-axis {
    display: none; /* On cache l'axe vertical sur mobile (trop complexe) */
  }

  .history-dates {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0;
  }
}

@media (max-width: 576px) {
  .history-dates {
    flex-direction: column;
  }
}

/* ============================================================
   OUR EXPERTISE v4 — Flex + hover 2x + 6ème disparaît
============================================================ */

.expertise-about {
  padding: 80px 0;
  background: #F5F5F5;
}

/* Header centré */
.expertise-header {
  max-width: 900px;
  margin: 0 auto;
}

.expertise-header .section-badge {
  margin: 0 auto;
}

.expertise-header .section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-black);
  margin: 1rem 0 0;
}

/* Grille → FLEX (au lieu de grid) pour pouvoir agrandir au hover */
.exp-grid {
  display: flex;
  gap: 1.25rem;
  border-top: 0;
  border-left: 0;
  /* ⚠️ overflow visible pour laisser la description sortir vers le bas */
  overflow: visible;
  position: relative;
}

/* ═══════════════════════════════════════════
   .exp-item = wrapper (carte + description)
   La hauteur reste fixe (= hauteur de la carte)
   La description est en absolute, elle ne pousse pas le layout
═══════════════════════════════════════════ */
.exp-item {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  position: relative;
  cursor: default;
  overflow: visible;
  transition: flex 0.5s cubic-bezier(.25,.46,.45,.94),
              opacity 0.5s ease,
              margin 0.5s cubic-bezier(.25,.46,.45,.94);
}

/* La carte visible (svg + titre + numéro) */
.exp-card {
  position: relative;
  width: 100%;
  height: 200px; /* = hauteur de la carte uniquement */
  background: var(--color-white);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* le numéro géant reste clippé dans la carte */
  transition: background 0.4s ease,
              border-color 0.4s ease,
              padding 0.5s ease;
}

/* Flèche en haut à droite */
.exp-arrow {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.35s opacity, transform 0.35s ease;
  z-index: 3;
}

.exp-arrow svg{
  height: 25px;
}

/* Titre centré verticalement */
.exp-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.7vw, 2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-black);
  text-align: center;
  margin: 0;
  transition: color 0.35s ease, font-size 0.4s ease;
  z-index: 2;
  position: relative;
}
.exp-title span{
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.4vw, 1.5rem);
}

/* GROS numéro en bas, toujours visible */
.exp-num-big {
  position: absolute;
  bottom: -1.2rem;
  left: 1.25rem;
  font-family: var(--font-micro);
  font-size: 4.5rem;
  font-weight: 200;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: #F5F5F5;
  transition: color 0.4s opacity, font-size 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   .exp-desc = description en absolute SOUS la carte
   Elle hérite de la position de son parent .exp-item
   → aucun calcul JS nécessaire
═══════════════════════════════════════════ */
.exp-desc {
  position: absolute;
  top: 100%;          /* juste sous la carte */
  left: 0;            /* aligné au bord gauche de la carte */
  width: 100%;        /* même largeur que la carte parente */
  padding: 1.5rem 0 0 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s ease,
              transform 0.35s ease,
              visibility 0.35s ease;
  pointer-events: none;
  z-index: 5;
}

.exp-desc-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-gray-600);
  margin: 0 0 0.3rem 0;
}

.exp-desc-text.is-bold {
  font-weight: 700;
  color: var(--color-black);
}

/* ═══════════════════════════════════════════
   HOVER : la carte devient ROUGE + flex:2
   La description s'affiche
═══════════════════════════════════════════ */
.exp-grid:hover .exp-item {
  flex: 1; /* reset par défaut pendant qu'une autre est hover */
}

.exp-grid .exp-item:hover {
  flex: 2; /* ← la carte hover prend 2x l'espace */
  background: transparent;
}

.exp-grid .exp-item:hover .exp-card {
  background: linear-gradient(135deg, #b70404 0%, #8e0404 100%);
  border-color: var(--color-red);
  padding: 2rem 1.5rem;
}

.exp-grid .exp-item:hover .exp-title {
  color: white;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
}

.exp-grid .exp-item:hover .exp-num-big {
  color: white;
  opacity: .26;
}

.exp-grid .exp-item:hover .exp-arrow {
  fill: white !important;
  opacity: .26;
}

/* Description visible uniquement sur la carte hover */
.exp-grid .exp-item:hover .exp-desc {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   La 6ème carte disparaît quand on hover n'importe quelle autre
   margin-left négatif = annule le gap fantôme
═══════════════════════════════════════════ */
.exp-grid:hover .exp-item:nth-child(6) {
  flex: 0;
  opacity: 0;
  pointer-events: none;
  margin-left: -1.25rem;
}

.exp-grid:hover .exp-item:nth-child(6) .exp-card {
  padding: 0;
  border: 0;
}

/* Cas spécial : si on hover la 6ème elle-même, elle reste
   et c'est la 1ère qui disparaît */
.exp-grid .exp-item:nth-child(6):hover {
  flex: 2 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  margin-left: 0 !important;
}

.exp-grid .exp-item:nth-child(6):hover .exp-card {
  padding: 2rem 1.5rem !important;
  border-right: 0.5px solid var(--color-red) !important;
  border-bottom: 0.5px solid var(--color-red) !important;
}

.exp-grid:has(.exp-item:nth-child(6):hover) .exp-item:nth-child(1) {
  flex: 0;
  opacity: 0;
  pointer-events: none;
  margin-right: -1.25rem;
}

.exp-grid:has(.exp-item:nth-child(6):hover) .exp-item:nth-child(1) .exp-card {
  padding: 0;
  border: 0;
}

/* ═══════════════════════════════════════════
   Réservation de l'espace pour la description sous la grille
═══════════════════════════════════════════ */
.exp-wrap {
  padding-bottom: 130px;
}

/* Dark mode descriptions */
body.dark-mode .exp-desc-text          { color: #999; }
body.dark-mode .exp-desc-text.is-bold  { color: #F0F0EC; }

/* ─── Dark mode ─── */
body.dark-mode .exp-grid { border-color: #333; }
body.dark-mode .exp-card { background: #111; border-color: #333; }
body.dark-mode .exp-title { color: #F0F0EC; }
body.dark-mode .exp-arrow { color: #666; }
body.dark-mode .exp-num-big { color: #333; }
body.dark-mode .exp-grid .exp-item:hover .exp-card { background: var(--color-red); border-color: var(--color-red); }
body.dark-mode .exp-grid .exp-item:hover .exp-title { color: white; }
body.dark-mode .exp-grid .exp-item:hover .exp-num-big { color: white; }

/* ─── Responsive ─── */
@media (max-width: 992px) {
  /* Sur tablette : grille en wrap, pas de flex magic */
  .exp-grid {
    flex-wrap: wrap;
  }
  .exp-item {
    flex: 0 0 calc(33.333% - 0.84rem); /* 3 colonnes en tenant compte du gap */
    aspect-ratio: 1 / 1;
    height: auto;
  }
  /* Reset : pas d'effet de disparition / agrandissement sur mobile */
  .exp-grid:hover .exp-item,
  .exp-grid .exp-item:hover,
  .exp-grid:hover .exp-item:nth-child(6),
  .exp-grid:has(.exp-item:nth-child(6):hover) .exp-item:nth-child(1) {
    flex: 0 0 calc(33.333% - 0.84rem);
    opacity: 1;
    pointer-events: auto;
    margin-left: 0;
    margin-right: 0;
  }
  .exp-grid:hover .exp-item:nth-child(6) .exp-card,
  .exp-grid:has(.exp-item:nth-child(6):hover) .exp-item:nth-child(1) .exp-card {
    padding: 1.75rem 1.25rem;
    border: 0;
  }
  .exp-grid .exp-item:hover .exp-card {
    background: var(--color-red);
  }
  /* Sur tablette/mobile, on cache la description (pas pratique au tap) */
  .exp-desc {
    display: none;
  }
  .exp-wrap {
    padding-bottom: 0;
  }
}

@media (max-width: 576px) {
  .exp-item {
    flex: 0 0 calc(50% - 0.625rem); /* 2 colonnes sur mobile */
  }
  .exp-grid:hover .exp-item,
  .exp-grid .exp-item:hover,
  .exp-grid:hover .exp-item:nth-child(6),
  .exp-grid:has(.exp-item:nth-child(6):hover) .exp-item:nth-child(1) {
    flex: 0 0 calc(50% - 0.625rem);
  }
  .exp-num-big { font-size: 5rem; }
  .exp-title { font-size: 0.95rem; }
}

/* ============================================================
   5. DARK MODE
============================================================ */
body.dark-mode .hero-about                  { border-color: #222; }
body.dark-mode .hero-about-title            { color: #F0F0EC; }
body.dark-mode .hero-about-body p           { color: #999; }
body.dark-mode .hero-about-body strong      { color: #F0F0EC; }

/* ============================================================
   6. RESPONSIVE
============================================================ */

@media (max-width: 576px) {
  .hero-about { padding: 120px 0 60px; }
  .hero-about-title { font-size: 2rem; }
}