/**
 * Tools Calculators — Styles page d'accueil
 */

/* ============================================================
   HERO HOME
   ============================================================ */
.tc-home-hero {
  padding: var(--tc-space-20) 0 var(--tc-space-16);
  background: linear-gradient(150deg, #EEF2FF 0%, #FFFFFF 55%, #F8FAFC 100%);
  overflow: hidden;
  position: relative;
}
.tc-home-hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at 80% 50%, rgba(29,78,216,.04) 0%, transparent 70%);
  pointer-events: none;
}

.tc-home-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--tc-space-12);
  align-items: center;
}

.tc-home-hero__eyebrow {
  display: flex;
  gap: var(--tc-space-2);
  margin-bottom: var(--tc-space-5);
}
.tc-home-hero__title {
  font-family: var(--tc-font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--tc-text);
  margin: 0 0 var(--tc-space-5);
}
.tc-home-hero__title span {
  color: var(--tc-primary);
}
.tc-home-hero__desc {
  font-size: var(--tc-text-lg);
  color: var(--tc-text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--tc-space-8);
}
.tc-home-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--tc-space-5);
}
.tc-home-hero__stats {
  display: flex;
  align-items: center;
  gap: var(--tc-space-3);
  font-size: var(--tc-text-sm);
  color: var(--tc-text-secondary);
  flex-wrap: wrap;
}
.tc-home-hero__stats strong {
  color: var(--tc-text);
}
.tc-home-hero__stats-sep {
  color: var(--tc-border-dark);
}

/* Visual côté droit */
.tc-home-hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}
.tc-home-hero__cards-stack {
  display: flex;
  flex-direction: column;
  gap: var(--tc-space-4);
  width: 100%;
  max-width: 340px;
}
.tc-home-hero__preview-card {
  background: var(--tc-white);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-lg);
  padding: var(--tc-space-5) var(--tc-space-6);
  display: flex;
  align-items: center;
  gap: var(--tc-space-4);
  box-shadow: var(--tc-shadow);
  transition: var(--tc-transition-slow);
}
.tc-home-hero__preview-card:hover {
  transform: translateX(4px);
  box-shadow: var(--tc-shadow-md);
}
/* Décalage en cascade */
.tc-home-hero__preview-card:nth-child(2) { margin-left: var(--tc-space-6); }
.tc-home-hero__preview-card:nth-child(3) { margin-left: var(--tc-space-12); }

.tc-home-hero__preview-icon { font-size: 1.75rem; flex-shrink: 0; }
.tc-home-hero__preview-label {
  font-size: var(--tc-text-sm);
  color: var(--tc-text-secondary);
  flex: 1;
}
.tc-home-hero__preview-value {
  font-family: var(--tc-font-heading);
  font-size: var(--tc-text-2xl);
  font-weight: 800;
  color: var(--tc-primary);
  white-space: nowrap;
}
.tc-home-hero__preview-card--hyrox .tc-home-hero__preview-value  { color: var(--tc-hyrox); }
.tc-home-hero__preview-card--cycling .tc-home-hero__preview-value { color: var(--tc-cycling); }
.tc-home-hero__preview-card--fitness .tc-home-hero__preview-value { color: var(--tc-primary); }

/* ============================================================
   CATÉGORIES GRID
   ============================================================ */
.tc-home-categories {
  background: var(--tc-white);
}
.tc-home-cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--tc-space-5);
}
@media (max-width: 900px) {
  .tc-home-cats-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
}

.tc-home-cat-card {
  display: flex;
  align-items: center;
  gap: var(--tc-space-5);
  padding: var(--tc-space-6);
  border: 1.5px solid var(--tc-border);
  border-radius: var(--tc-radius-xl);
  background: var(--tc-white);
  text-decoration: none;
  transition: var(--tc-transition-slow);
  box-shadow: var(--tc-shadow-sm);
}
.tc-home-cat-card:hover {
  box-shadow: var(--tc-shadow-md);
  transform: translateY(-3px);
}
.tc-home-cat-card--hyrox:hover   { border-color: var(--tc-hyrox); }
.tc-home-cat-card--cycling:hover { border-color: var(--tc-cycling); }
.tc-home-cat-card--fitness:hover { border-color: var(--tc-primary); }

.tc-home-cat-card__icon {
  font-size: 2.5rem;
  width: 64px;
  height: 64px;
  border-radius: var(--tc-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tc-home-cat-card--hyrox   .tc-home-cat-card__icon { background: var(--tc-hyrox-pale); }
.tc-home-cat-card--cycling .tc-home-cat-card__icon { background: var(--tc-cycling-pale); }
.tc-home-cat-card--fitness .tc-home-cat-card__icon { background: var(--tc-fitness-pale); }

.tc-home-cat-card__content { flex: 1; min-width: 0; }
.tc-home-cat-card__title {
  font-family: var(--tc-font-heading);
  font-size: var(--tc-text-2xl);
  font-weight: 800;
  color: var(--tc-text);
  margin: 0 0 var(--tc-space-2);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.tc-home-cat-card--hyrox   .tc-home-cat-card__title { color: var(--tc-hyrox); }
.tc-home-cat-card--cycling .tc-home-cat-card__title { color: var(--tc-cycling); }
.tc-home-cat-card--fitness .tc-home-cat-card__title { color: var(--tc-primary); }

.tc-home-cat-card__desc {
  font-size: var(--tc-text-sm);
  color: var(--tc-text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--tc-space-3);
}
.tc-home-cat-card__meta { display: flex; }
.tc-home-cat-card__arrow {
  font-size: var(--tc-text-xl);
  color: var(--tc-border-dark);
  flex-shrink: 0;
  transition: var(--tc-transition);
  margin-left: auto;
}
.tc-home-cat-card:hover .tc-home-cat-card__arrow {
  color: var(--tc-primary);
  transform: translateX(4px);
}

/* ============================================================
   SECTIONS CALCULATEURS PAR CATÉGORIE
   ============================================================ */
.tc-home-calc-section {}
.tc-home-calc-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--tc-space-6);
  margin-bottom: var(--tc-space-8);
  flex-wrap: wrap;
}
.tc-home-calc-section__title {
  font-family: var(--tc-font-heading);
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  font-weight: 800;
  margin: var(--tc-space-3) 0 var(--tc-space-2);
  color: var(--tc-text);
}

/* ============================================================
   COMMENT ÇA MARCHE
   ============================================================ */
.tc-home-how {
  background: var(--tc-white);
}
.tc-home-steps {
  counter-reset: steps;
}
.tc-home-step {
  text-align: center;
  padding: var(--tc-space-8);
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius-xl);
  background: var(--tc-white);
  position: relative;
  transition: var(--tc-transition);
}
.tc-home-step:hover {
  border-color: var(--tc-primary-light);
  box-shadow: var(--tc-shadow);
}
.tc-home-step__number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--tc-primary);
  color: var(--tc-white);
  border-radius: 50%;
  font-size: var(--tc-text-xs);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-home-step__icon {
  font-size: 2.5rem;
  margin-bottom: var(--tc-space-4);
}
.tc-home-step__title {
  font-family: var(--tc-font-heading);
  font-size: var(--tc-text-xl);
  font-weight: 700;
  margin-bottom: var(--tc-space-3);
  color: var(--tc-text);
}
.tc-home-step__desc {
  font-size: var(--tc-text-sm);
  color: var(--tc-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   CTA BAS DE PAGE
   ============================================================ */
.tc-home-cta {
  background: linear-gradient(135deg, var(--tc-primary) 0%, var(--tc-primary-dark) 100%);
  padding: var(--tc-space-16) 0;
}
.tc-home-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tc-space-8);
  flex-wrap: wrap;
}
.tc-home-cta__title {
  font-family: var(--tc-font-heading);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 800;
  color: rgba(255,255,255,.85);
  margin: 0 0 var(--tc-space-3);
  line-height: 1.1;
}
.tc-home-cta__title span { color: var(--tc-white); }
.tc-home-cta__content p {
  color: rgba(255,255,255,.7);
  font-size: var(--tc-text-lg);
  margin: 0;
}

/* ============================================================
   RESPONSIVE HOME
   ============================================================ */
@media (max-width: 1024px) {
  .tc-home-hero__inner {
    grid-template-columns: 1fr;
  }
  .tc-home-hero__visual {
    display: none;
  }
  .tc-home-hero {
    padding: var(--tc-space-14) 0 var(--tc-space-10);
  }
}
@media (max-width: 768px) {
  .tc-home-hero__actions {
    align-items: stretch;
  }
  .tc-home-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .tc-home-cta .tc-btn {
    width: 100%;
  }
  .tc-home-cats-grid {
    grid-template-columns: 1fr;
  }
}
