/* ==========================================================================
   SOS Informatique 06 — Responsive
   Mobile-first + breakpoints tablet/desktop
   ========================================================================== */

/* ============================================================
   MOBILE (< 768px)
   ============================================================ */
@media (max-width: 767px) {
  :root {
    --nav-height: 64px;
    --space-section: 3rem;
  }

  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }

  .container {
    padding-inline: var(--space-md);
  }

  /* Grid fallback single column */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  /* ---- Nav mobile ---- */
  .nav__menu { display: none; }
  .nav__cta--desktop { display: none; }
  .nav__hamburger { display: flex; }
  .lang-switcher { display: none; } /* Langue dans l'overlay */

  /* Hamburger blanc sur hero sombre (géré par .nav--dark-hero dans components.css) */

  /* ---- Hero ---- */
  .hero {
    min-height: 85vh;
    padding-top: calc(var(--nav-height) + var(--space-xl));
  }

  .hero--image {
    min-height: 70vh;
  }

  .hero--image .hero__title {
    font-size: clamp(1.4rem, 6vw, 2.2rem);
  }

  .hero--image .hero__subtitle {
    font-size: var(--font-size-sm);
  }

  .hero--compact {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-xl));
    padding-bottom: var(--space-xl);
  }

  .hero--compact h1,
  .hero--compact .hero__title {
    font-size: var(--font-size-2xl);
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__badge {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* ---- Split screen ---- */
  .split-screen {
    grid-template-columns: 1fr !important;
  }

  /* ---- Cards ---- */
  .card {
    padding: var(--space-xl);
  }

  .card__icon {
    width: 48px;
    height: 48px;
  }

  /* ---- About founder ---- */
  .about-founder {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about-founder__photo {
    position: static;
    max-width: 280px;
    margin-inline: auto;
  }

  .about-why__grid {
    grid-template-columns: 1fr !important;
  }

  /* ---- Trust numbers ---- */
  .trust-numbers.grid--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }

  /* ---- Reviews ---- */
  .reviews__grid {
    grid-template-columns: 1fr !important;
  }

  .reviews__badge {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .review-card {
    padding: var(--space-lg);
  }

  .review-card::before {
    font-size: 80px;
    top: -5px;
    right: 10px;
  }

  /* ---- Partners ---- */
  .partners-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--space-md);
  }

  .partner-card {
    padding: var(--space-md);
  }

  .partner-card img {
    width: 40px;
    height: 40px;
  }

  /* ---- Clients marquee ---- */
  .clients-marquee__item {
    padding: 8px var(--space-md);
  }

  .clients-marquee__item img {
    width: 24px;
    height: 24px;
  }

  /* ---- Devis ---- */
  .devis-choices {
    grid-template-columns: 1fr !important;
  }

  .devis-checkboxes {
    grid-template-columns: 1fr !important;
  }

  .devis-nav {
    flex-direction: column;
    gap: var(--space-md);
  }

  .devis-nav .btn {
    width: 100%;
    justify-content: center;
  }

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

  .contact-info {
    margin-top: var(--space-2xl);
  }

  /* ---- Service points ---- */
  .service-points {
    grid-template-columns: 1fr;
  }

  /* ---- Footer ---- */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer__bar {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .footer__logo-img {
    width: 150px !important;
  }

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

  .blog-filters {
    gap: 6px;
  }

  .blog-filter {
    padding: 6px 14px;
    font-size: 12px;
  }

  /* ---- Sections spacing ---- */
  .section__header {
    margin-bottom: var(--space-xl);
  }

  /* ---- CTA gradient buttons ---- */
  .cta-gradient__buttons,
  .cta-gradient .flex {
    flex-direction: column;
    width: 100%;
  }

  .cta-gradient__buttons .btn,
  .cta-gradient .flex .btn {
    width: 100%;
    justify-content: center;
  }

  /* ---- FAQ ---- */
  .faq summary {
    font-size: var(--font-size-base);
    padding: var(--space-md);
  }

  /* ---- Padding bottom for floating CTA ---- */
  body {
    padding-bottom: 80px;
  }
}

/* ============================================================
   SMALL MOBILE (< 380px)
   ============================================================ */
@media (max-width: 379px) {
  h1 { font-size: var(--font-size-2xl); }
  h2 { font-size: var(--font-size-xl); }

  .trust-numbers.grid--4 {
    grid-template-columns: 1fr;
  }

  .partners-grid {
    grid-template-columns: 1fr !important;
  }

  .btn {
    padding: 12px 20px;
    font-size: var(--font-size-sm);
  }
}

/* ============================================================
   TABLET (768px - 1023px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__menu {
    display: none;
  }

  .nav__cta--desktop {
    display: none;
  }

  /* Hamburger blanc sur hero sombre (géré par .nav--dark-hero dans components.css) */

  .hero--image .hero__title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
  }

  .about-founder {
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
  }

  .about-founder__photo {
    position: static;
  }

  .reviews__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .devis-choices {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Padding bottom for floating CTA */
  body {
    padding-bottom: 80px;
  }
}

/* ============================================================
   DESKTOP (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .nav__hamburger {
    display: none;
  }

  .nav__overlay {
    display: none !important;
  }
}

/* ============================================================
   LARGE DESKTOP (1280px+)
   ============================================================ */
@media (min-width: 1280px) {
  .container {
    padding-inline: var(--space-xl);
  }
}

/* ============================================================
   FLOATING MOBILE CTA (Call Button)
   ============================================================ */
.mobile-cta {
  display: none;
}

@media (max-width: 1023px) {
  .mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9997;
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 10px var(--space-md);
    gap: var(--space-sm);
    align-items: center;
    justify-content: center;
  }

  .mobile-cta__call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    flex: 1;
    padding: 14px var(--space-lg);
    background: var(--it-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-base);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
  }

  .mobile-cta__call:hover,
  .mobile-cta__call:active {
    background: var(--it-primary-dark);
    transform: scale(0.98);
  }

  .mobile-cta__call svg {
    width: 20px;
    height: 20px;
    animation: phone-ring 1.5s ease-in-out infinite;
  }

  @keyframes phone-ring {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-12deg); }
    20% { transform: rotate(12deg); }
    30% { transform: rotate(-8deg); }
    40% { transform: rotate(8deg); }
    50% { transform: rotate(0deg); }
  }

  .mobile-cta__devis {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 14px var(--space-lg);
    background: var(--sr-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
  }

  .mobile-cta__devis:hover,
  .mobile-cta__devis:active {
    background: var(--sr-primary-dark);
  }

  .mobile-cta__devis svg {
    width: 18px;
    height: 18px;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .nav, .mobile-cta, .footer__socials, .scroll-indicator,
  .page-transition, .lang-switcher {
    display: none !important;
  }

  body {
    padding-bottom: 0;
    color: #000;
    background: #fff;
  }

  .hero--image {
    min-height: auto;
    background: #f5f5f5 !important;
  }

  .hero__overlay, .hero__bg {
    display: none;
  }
}
