/* ============================================================
   e-talent.tn — responsive.css
   Media queries : tablette (≤1024px), mobile (≤768px),
   très petit mobile (≤480px)
   ============================================================ */

/* ============================================================
   TABLETTE LARGE (≤ 1200px)
   ============================================================ */
@media (max-width: 1200px) {
  :root {
    --container-max: 100%;
    --container-pad: clamp(1.25rem, 4vw, 2rem);
  }

  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr;
  }

  .footer-top .footer-col:last-child {
    grid-column: 1 / -1;
  }

  .hero-ecosystem {
    width: 360px;
    height: 360px;
  }

  .hero__visual { height: 460px; }

  .expertise-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   TABLETTE (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {

  /* Navigation */
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  /* Hero */
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-12);
  }

  .hero__text { max-width: 100%; }

  .hero__visual {
    justify-self: center;
    height: 400px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

  .btn-group { justify-content: center; }

  /* Overview */
  .overview-cards { grid-template-columns: 1fr; }
  .overview-card { min-height: auto; }

  /* Expertise */
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }

  /* Process */
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  .process-steps::before { display: none; }

  /* Why */
  .why-grid { grid-template-columns: repeat(2, 1fr); }

  /* Solutions */
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .footer-brand { grid-column: 1 / -1; }
  .footer-brand__desc { max-width: 100%; }

  /* Page hero */
  .page-hero__title {
    font-size: clamp(var(--text-2xl), 5vw, var(--text-5xl));
  }

  /* Contact form */
  .contact-layout {
    grid-template-columns: 1fr !important;
  }

  /* Product detail */
  .product-detail-layout {
    grid-template-columns: 1fr !important;
  }

  /* Video grid */
  .video-grid { grid-template-columns: 1fr; }

  /* Services list */
  .services-layout {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   TABLETTE PORTRAIT / GRAND MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --header-h: 70px;
  }

  /* Typographie */
  .section-title {
    font-size: clamp(var(--text-xl), 5vw, var(--text-3xl));
  }

  .section-subtitle {
    font-size: var(--text-base);
  }

  /* Sections */
  .section { padding: var(--space-16) 0; }
  .section--lg { padding: var(--space-20) 0; }

  /* Hero */
  .hero__content { padding: var(--space-12) 0; }

  .hero__title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  .hero-ecosystem {
    width: 300px;
    height: 300px;
  }

  .hero__visual { height: 340px; }

  .hero-node--smp  { right: -40px; }
  .hero-node--cloud { left: -40px; }

  .hero-stat {
    display: none;
  }

  /* Cards */
  .grid-2  { grid-template-columns: 1fr; }
  .grid-3  { grid-template-columns: 1fr; }
  .grid-4  { grid-template-columns: repeat(2, 1fr); }

  /* Process */
  .process-steps { grid-template-columns: 1fr; }

  /* Why */
  .why-grid { grid-template-columns: 1fr; }

  /* Expertise */
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-brand { grid-column: auto; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal { justify-content: center; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; }

  /* Tabs */
  .tabs { flex-wrap: nowrap; }

  /* Module grid */
  .module-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Page hero */
  .page-hero {
    padding-top: calc(var(--header-h) + var(--space-12));
    padding-bottom: var(--space-12);
  }

  /* Boutons */
  .btn-group {
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin: 0 auto;
  }

  .btn-group .btn {
    justify-content: center;
  }

  /* WhatsApp */
  .whatsapp-btn {
    bottom: var(--space-5);
    right: var(--space-5);
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }

  /* CTA section */
  .cta-section {
    padding: var(--space-16) 0;
  }

  /* Overview */
  .overview-card { padding: var(--space-6); }

  /* Why item */
  .why-item { flex-direction: column; gap: var(--space-3); }

  /* Contact info */
  .contact-info-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root {
    --container-pad: 1rem;
  }

  /* Typographie */
  .hero__title {
    font-size: 1.75rem;
  }

  /* Grille 4 col → 1 col */
  .grid-4 { grid-template-columns: 1fr; }

  /* Expertise */
  .expertise-grid { grid-template-columns: 1fr; }

  /* Module grid */
  .module-grid {
    grid-template-columns: 1fr !important;
  }

  /* Cards */
  .card { padding: var(--space-5); }
  .product-card__content { padding: var(--space-5); }

  /* Sections */
  .section { padding: var(--space-12) 0; }

  /* Badges */
  .section-label { font-size: 0.65rem; }

  /* Hero ecosystem */
  .hero-ecosystem {
    width: 260px;
    height: 260px;
  }

  .hero__visual { height: 300px; }

  .hero-node--erp,
  .hero-node--dev { display: none; }

  /* Process step */
  .process-step__num {
    width: 60px;
    height: 60px;
    font-size: var(--text-lg);
  }

  /* Section title */
  .section-title {
    font-size: var(--text-xl);
  }

  /* Boutons */
  .btn { font-size: var(--text-xs); padding: 0.75rem 1.25rem; }
  .btn--lg { font-size: var(--text-sm); padding: 0.875rem 1.5rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header,
  .whatsapp-btn,
  .nav-toggle,
  .mobile-nav,
  .hero__bg,
  .hero__particles,
  .cta-section { display: none !important; }

  body { color: #000; background: #fff; }

  a { color: inherit; text-decoration: underline; }

  .container { max-width: 100%; }

  .section { padding: 2rem 0; }

  .card, .product-card, .expertise-item {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .page-hero {
    background: #f5f5f5;
    color: #000;
    padding: 2rem 0;
  }

  .page-hero__title { color: #000; }
  .page-hero__subtitle { color: #333; }
}

/* ============================================================
   UTILITAIRES RESPONSIVE
   ============================================================ */
.hide-mobile  { }
.show-mobile  { display: none; }

@media (max-width: 768px) {
  .hide-mobile  { display: none !important; }
  .show-mobile  { display: block !important; }
  .hide-tablet  { display: none !important; }
}

@media (max-width: 1024px) {
  .hide-desktop { display: none !important; }
}

/* Texte responsive */
.text-mobile-center {
  text-align: left;
}

@media (max-width: 768px) {
  .text-mobile-center { text-align: center; }
  .section-divider--left { margin: var(--space-4) auto 0; }
}

/* Stack mobile */
.stack-mobile {
  display: flex;
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .stack-mobile {
    flex-direction: column;
  }
}
