/*
 * TRANSMUTE CONSULTING — Responsive CSS Global
 * Mobile-first responsive system for all pages
 * Breakpoints: 480px | 768px | 1024px | 1280px
 */

/* ══════════════════════════════════════════════
   HAMBURGER MENU — Mobile Navigation
   ══════════════════════════════════════════════ */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1100;
  background: none;
  border: none;
  padding: 0;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--blanc);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.25s ease,
              width 0.25s ease;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  width: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ══════════════════════════════════════════════
   MOBILE MENU DRAWER
   ══════════════════════════════════════════════ */

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 11, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  padding: 2.5rem 2rem;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);

  /* Animation */
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.mobile-menu a {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gris);
  text-decoration: none;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 0.2s ease;
}

.mobile-menu a:hover,
.mobile-menu a:active {
  color: var(--blanc);
}

.mobile-menu .mobile-cta {
  margin-top: 2rem;
  display: inline-block;
  background: var(--vert);
  color: var(--noir) !important;
  padding: 1rem 2rem;
  border-radius: 2px;
  font-family: 'Syne', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  text-align: center;
  border-bottom: none !important;
  letter-spacing: 0.04em !important;
}

/* ══════════════════════════════════════════════
   BREAKPOINT: ≤ 1024px (Tablet)
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  /* Navigation */
  .nav-links { display: none !important; }
  .hamburger { display: flex; }

  /* Layout */
  .section-inner {
    padding: 5rem 2rem !important;
  }

  /* Grids → 1 column */
  .strengths-grid,
  .services-grid,
  .offerings-grid,
  .team-grid,
  .blog-grid,
  .resources-grid {
    grid-template-columns: 1fr !important;
  }

  /* 2-col grids → single col */
  .geo-inner,
  .cta-inner {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
  }

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

/* ══════════════════════════════════════════════
   BREAKPOINT: ≤ 768px (Mobile Large)
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Section padding */
  .section-inner {
    padding: 4rem 1.25rem !important;
  }

  /* Hero */
  .hero {
    padding: 6rem 1.25rem 4rem !important;
    min-height: 90vh !important;
  }

  /* Hero buttons stacked */
  .hero-buttons,
  .hero .btn-ghost {
    display: block !important;
    margin-left: 0 !important;
    margin-top: 1rem !important;
    text-align: center !important;
  }

  .hero .btn-primary,
  .hero .btn-ghost {
    width: 100%;
    text-align: center;
    display: block;
  }

  /* Trust bar — 2 col */
  .trust-bar-inner {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Footer — 1 col */
  .footer-grid {
    grid-template-columns: 1fr !important;
    padding: 3rem 1.25rem 2rem !important;
    gap: 2rem !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 0.75rem !important;
    text-align: center !important;
    padding: 1.25rem 1.25rem !important;
  }

  .footer-bottom div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem !important;
  }

  /* Steps → 1 col */
  .steps-list {
    grid-template-columns: 1fr !important;
  }

  /* Cards padding */
  .strength-card,
  .service-card {
    padding: 2rem 1.5rem !important;
  }

  /* Geo section */
  .geo-inner {
    padding: 4rem 1.25rem !important;
    gap: 2rem !important;
  }

  /* CTA section */
  .cta-inner {
    padding: 4rem 1.25rem !important;
    gap: 2rem !important;
  }

  /* Sectors chips — wrap nicely */
  .sectors-grid {
    gap: 0.5rem !important;
  }

  /* Page wrapper (legal/simple pages) */
  .page-wrapper {
    padding: 6rem 1.25rem 4rem !important;
  }

  /* Nav padding */
  nav {
    padding: 0 1.25rem !important;
  }

  /* Contact grid */
  .contact-grid,
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  /* About / apropos */
  .about-grid,
  .profile-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  /* Formations grid */
  .formations-grid,
  .courses-grid {
    grid-template-columns: 1fr !important;
  }

  /* Blog grid */
  .blog-grid {
    grid-template-columns: 1fr !important;
  }

  /* Ressources grid */
  .resources-grid {
    grid-template-columns: 1fr !important;
  }

  /* Inscription form */
  .inscription-grid,
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Tables → scrollable */
  .table-wrapper,
  table {
    overflow-x: auto;
    display: block;
    -webkit-overflow-scrolling: touch;
  }

  /* Strength number smaller on mobile */
  .strength-num {
    font-size: 3.5rem !important;
  }

  /* Section header */
  .section-header {
    margin-bottom: 2.5rem !important;
  }

  /* Geo badges wrap */
  .geo-badges {
    gap: 0.4rem !important;
  }
}

/* ══════════════════════════════════════════════
   BREAKPOINT: ≤ 480px (Mobile Small)
   ══════════════════════════════════════════════ */

@media (max-width: 480px) {
  /* Trust bar — stacked */
  .trust-bar-inner {
    grid-template-columns: 1fr !important;
  }

  .trust-stat {
    padding: 1.5rem 1.25rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  /* Hero h1 tighter */
  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.8rem) !important;
    line-height: 1.1 !important;
  }

  /* Smaller section titles */
  h2.section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
  }

  /* Card padding */
  .strength-card,
  .service-card,
  .blog-card,
  .resource-card {
    padding: 1.75rem 1.25rem !important;
  }

  /* Footer bottom links stack */
  .footer-bottom div {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem !important;
  }

  /* Page title */
  .page-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem) !important;
  }

  /* Geo badges full width on tiny screens */
  .geo-badge {
    font-size: 0.62rem !important;
    padding: 0.35rem 0.75rem !important;
  }
}

/* ══════════════════════════════════════════════
   BODY SCROLL LOCK when mobile menu open
   ══════════════════════════════════════════════ */
body.menu-open {
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   Touch-friendly tap targets
   ══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-cta,
  .btn-primary,
  .btn-ghost,
  .service-link,
  .footer-col a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .footer-col a {
    padding: 0.3rem 0 !important;
  }
}

/* ══════════════════════════════════════════════
   PAGE-SPECIFIC: Contact
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
  }
  .quick-contact-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

@media (max-width: 768px) {
  .contact-section,
  .zone-section,
  .quick-contact {
    padding: 4rem 1.25rem !important;
  }
  .two-cols {
    grid-template-columns: 1fr !important;
  }
  .zone-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .zone-grid {
    grid-template-columns: 1fr !important;
  }
  input,
  textarea,
  select {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
  }
}

/* ══════════════════════════════════════════════
   PAGE-SPECIFIC: Formations
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: 1fr !important;
  }
  .formation-hero-inner {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

@media (max-width: 768px) {
  .course-card {
    padding: 2rem 1.25rem !important;
  }
  .formation-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
  }
  .formation-tab {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}

/* ══════════════════════════════════════════════
   PAGE-SPECIFIC: À propos
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .profile-layout,
  .about-layout {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
  }
  .certifs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .certifs-grid {
    grid-template-columns: 1fr !important;
  }
  .timeline-item {
    padding-left: 1.5rem !important;
  }
}

/* ══════════════════════════════════════════════
   PAGE-SPECIFIC: Blog & Ressources
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .resources-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .blog-grid,
  .resources-grid {
    grid-template-columns: 1fr !important;
  }
  .filter-bar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    padding-bottom: 0.5rem !important;
  }
  .filter-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
}

/* ══════════════════════════════════════════════
   PAGE-SPECIFIC: Inscription / Form
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
  .inscription-form {
    padding: 2rem 1.25rem !important;
  }
  .form-row {
    grid-template-columns: 1fr !important;
  }
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ══════════════════════════════════════════════
   GLOBAL: Improve tap targets & readability
   ══════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Larger line-height on mobile for readability */
  body {
    line-height: 1.75 !important;
  }

  /* Improve paragraph spacing */
  p {
    margin-bottom: 0.75rem;
  }

  /* Scrollable horizontal content */
  .overflow-x-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Better button sizing on mobile */
  .btn-primary,
  .btn-ghost {
    padding: 1rem 1.75rem !important;
    font-size: 0.88rem !important;
  }

  /* Sector chips smaller gap */
  .sector-chip {
    padding: 0.5rem 1rem !important;
    font-size: 0.78rem !important;
  }
}
