/* ============================================================
   2DA INFORMATIQUE — HOMEPAGE STYLES
   front-page.php — css/homepage.css
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
  --red:      #CC1F1F;
  --red-d:    #a81515;
  --blue:     #1A4FA0;
  --blue-d:   #0d2460;
  --dark:     #0d0d14;
  --white:    #ffffff;
  --off:      #f5f7fc;
  --light:    #eef1f8;
  --gray:     #8a8fa8;
  --border:   rgba(26,79,160,0.12);
  --shadow:   0 4px 28px rgba(26,79,160,0.09);
  --shadow-h: 0 14px 48px rgba(26,79,160,0.18);
  --fd:  'Bebas Neue', sans-serif;
  --fh:  'Rajdhani', sans-serif;
  --fb:  'DM Sans', sans-serif;
}

/* ── Reset homepage ───────────────────────────────────────── */
.tda-home { font-family: var(--fb); background: var(--off); }
.tda-home * { box-sizing: border-box; }
.tda-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.tda-section { padding: 64px 0; }
.tda-section--offwhite { background: var(--off); }
.tda-section:not(.tda-section--offwhite) { background: var(--white); }

/* ── Section header ───────────────────────────────────────── */
.tda-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
}
.tda-section__title {
  font-family: var(--fd);
  font-size: 40px;
  letter-spacing: 2px;
  color: var(--dark);
  line-height: 1;
  margin: 0;
}
.tda-accent { color: var(--red); }
.tda-section__link {
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.5px;
  font-family: var(--fb);
  transition: color 0.2s;
}
.tda-section__link:hover { color: var(--red); }

/* ── Buttons ──────────────────────────────────────────────── */
.tda-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--fh);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}
.tda-btn--red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(204,31,31,0.25);
}
.tda-btn--red:hover {
  background: var(--red-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(204,31,31,0.38);
  color: #fff;
}
.tda-btn--outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.35);
}
.tda-btn--outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ============================================================
   HERO
   ============================================================ */
.tda-hero {
  background:
    radial-gradient(ellipse at 72% 50%, rgba(26,79,160,0.30) 0%, transparent 60%),
    radial-gradient(ellipse at 18% 80%, rgba(204,31,31,0.18) 0%, transparent 50%),
    linear-gradient(135deg, #0d0d14 0%, #0d1a3a 55%, #150808 100%);
  min-height: 88vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

/* animated grain overlay */
.tda-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

.tda-hero__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Left */
.tda-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(204,31,31,0.18);
  border: 1px solid rgba(204,31,31,0.4);
  color: #ff7070;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 22px;
  display: inline-block;
  font-family: var(--fb);
}
.tda-hero__title {
  font-family: var(--fd);
  font-size: clamp(50px, 6vw, 82px);
  color: #fff;
  line-height: 0.93;
  letter-spacing: 2px;
  margin: 0 0 22px;
}
.tda-hero__desc {
  color: rgba(255,255,255,0.62);
  font-size: 16px;
  line-height: 1.75;
  max-width: 460px;
  margin: 0 0 38px;
  font-family: var(--fb);
}
.tda-hero__btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Right — 4 mini-cards */
.tda-hero__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tda-hero__card {
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 22px 20px;
  transition: all 0.3s;
  cursor: pointer;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tda-hero__card:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.tda-hcard__icon { font-size: 34px; margin-bottom: 12px; display: block; }
.tda-hcard__label {
  color: rgba(255,255,255,0.45);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: var(--fb);
  display: block;
}
.tda-hcard__title {
  color: #fff;
  font-family: var(--fh);
  font-weight: 700;
  font-size: 16px;
  margin-top: 5px;
  display: block;
  line-height: 1.2;
}
.tda-hcard__price {
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  display: block;
  font-family: var(--fb);
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.tda-trust {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.tda-trust__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 14px;
}
.tda-trust__item {
  display: flex;
  align-items: center;
  gap: 11px;
}
.tda-trust__icon { font-size: 22px; }
.tda-trust__item strong {
  font-weight: 700;
  font-size: 14px;
  display: block;
  color: var(--dark);
  font-family: var(--fb);
}
.tda-trust__item span {
  color: var(--gray);
  font-size: 11px;
  font-family: var(--fb);
}

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.tda-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.tda-cat-card {
  background: var(--white);
  border-radius: 18px;
  border: 2px solid transparent;
  padding: 22px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.tda-cat-card:hover {
  border-color: var(--blue);
  transform: translateY(-5px);
  box-shadow: var(--shadow-h);
}
.tda-cat-card__icon { font-size: 34px; }
.tda-cat-card__name {
  font-family: var(--fh);
  font-weight: 700;
  font-size: 13px;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}
.tda-cat-card:hover .tda-cat-card__name { color: var(--blue); }
.tda-cat-card__count {
  font-size: 11px;
  color: var(--gray);
  font-family: var(--fb);
}

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.tda-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}
.tda-products-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.tda-product-card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
}
.tda-product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-h);
  border-color: var(--blue);
}

/* Badge */
.tda-product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 20px;
  z-index: 2;
  font-family: var(--fh);
}
.tda-badge--red   { background: var(--red); color: #fff; }
.tda-badge--blue  { background: var(--blue); color: #fff; }
.tda-badge--green { background: #16a34a; color: #fff; }

/* Image */
.tda-product-card__img-link { display: block; }
.tda-product-card__img {
  height: 210px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tda-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  transition: transform 0.3s;
}
.tda-product-card:hover .tda-product-card__img img {
  transform: scale(1.05);
}
.tda-product-card__noimg {
  font-size: 72px;
  opacity: 0.3;
}

/* Body */
.tda-product-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.tda-product-card__brand {
  font-size: 10px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: var(--fb);
}
.tda-product-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  text-decoration: none;
  font-family: var(--fb);
  display: block;
}
.tda-product-card__name:hover { color: var(--blue); }
.tda-product-card__rating { line-height: 1; }
.tda-product-card__rating .star-rating { font-size: 12px; }

.tda-product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.tda-product-card__price {
  font-family: var(--fh);
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}
.tda-product-card__price del {
  font-size: 12px;
  color: var(--gray);
  font-family: var(--fb);
  font-weight: 400;
  display: block;
}
.tda-product-card__price ins { text-decoration: none; }

/* Add to cart button */
.tda-add-to-cart,
.tda-product-card .button {
  background: var(--dark) !important;
  color: #fff !important;
  border: none !important;
  padding: 9px 16px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-family: var(--fb) !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  white-space: nowrap !important;
}
.tda-add-to-cart:hover,
.tda-product-card .button:hover {
  background: var(--red) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

/* ============================================================
   PROMO BANNER
   ============================================================ */
.tda-promo-banner {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-d) 100%);
  border-radius: 26px;
  padding: 52px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  position: relative;
}
.tda-promo-banner::after {
  content: '💻';
  font-size: 200px;
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.06;
  pointer-events: none;
}
.tda-promo-banner__text { position: relative; z-index: 1; }
.tda-promo-banner__tag {
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--fb);
}
.tda-promo-banner__title {
  font-family: var(--fd);
  font-size: 46px;
  color: #fff;
  letter-spacing: 2px;
  line-height: 1;
  margin: 0 0 10px;
}
.tda-promo-banner__title em { color: #ffcc00; font-style: normal; }
.tda-promo-banner p {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  margin: 0;
  font-family: var(--fb);
}
.tda-promo-banner .tda-btn { flex-shrink: 0; position: relative; z-index: 1; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes tda-fadein {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tda-hero__left { animation: tda-fadein 0.7s ease both; }
.tda-hero__right { animation: tda-fadein 0.7s 0.15s ease both; }
.tda-trust__item { animation: tda-fadein 0.5s ease both; }
.tda-cat-card:nth-child(1)  { animation: tda-fadein 0.4s 0.05s ease both; }
.tda-cat-card:nth-child(2)  { animation: tda-fadein 0.4s 0.10s ease both; }
.tda-cat-card:nth-child(3)  { animation: tda-fadein 0.4s 0.15s ease both; }
.tda-cat-card:nth-child(4)  { animation: tda-fadein 0.4s 0.20s ease both; }
.tda-cat-card:nth-child(5)  { animation: tda-fadein 0.4s 0.25s ease both; }
.tda-cat-card:nth-child(6)  { animation: tda-fadein 0.4s 0.30s ease both; }
.tda-cat-card:nth-child(7)  { animation: tda-fadein 0.4s 0.35s ease both; }
.tda-cat-card:nth-child(8)  { animation: tda-fadein 0.4s 0.40s ease both; }
.tda-cat-card:nth-child(9)  { animation: tda-fadein 0.4s 0.45s ease both; }
.tda-cat-card:nth-child(10) { animation: tda-fadein 0.4s 0.50s ease both; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .tda-hero__inner { grid-template-columns: 1fr; }
  .tda-hero__right { display: none; }
  .tda-products-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .tda-promo-banner { flex-direction: column; padding: 40px 32px; }
  .tda-promo-banner__title { font-size: 36px; }
}
@media (max-width: 768px) {
  .tda-hero { min-height: 70vh; padding: 60px 0; }
  .tda-hero__inner { padding: 0 20px; }
  .tda-hero__title { font-size: 52px; }
  .tda-products-grid { grid-template-columns: repeat(2, 1fr); }
  .tda-products-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .tda-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .tda-section { padding: 44px 0; }
  .tda-trust__inner { padding: 0 16px; gap: 10px; }
  .tda-promo-banner { padding: 32px 24px; border-radius: 18px; }
}
@media (max-width: 480px) {
  .tda-products-grid,
  .tda-products-grid--4 { grid-template-columns: 1fr; }
  .tda-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .tda-hero__btns { flex-direction: column; }
  .tda-btn { text-align: center; justify-content: center; }
}
