/* ════════════════════════════════════════════════════════════
   PIX|WEB — 13-mobile.css
   Responsive mobile (≤640px / ≤560px) & tablette (≥641px)
   
   ⚠️  NE PAS SUPPRIMER — chargé après site.css dans chaque page
   ⚠️  NE PAS INTÉGRER dans rebuild_site.py (fichier autonome)
   
   Dernière mise à jour : 15/04/2026
   ════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════
   PIX|WEB — RESPONSIVE MOBILE & TABLETTE
   Consolidé le 15/04/2026 · Téléphone ≤640px · Tablette 641px+
   ════════════════════════════════════════════════════════════ */


/* ─── GLOBALS (hors media query) ────────────────────────── */
.pw-hero-price--m  { display: none; }
.footer-recrute    { display: none; }
.sp-carousel-dots  {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}


/* ─── ≤1024px — cartes + inclus ─────────────────────────── */
@media (max-width: 1024px) {
  /* Image toujours avant texte sur mobile/tablette */
  .pw-card--split .split-media   { order: 1 !important; }
  .pw-card--split .split-content { order: 2 !important; }

  /* Conclusion inclus.html */
  .page-inclus .pw-card--split-conclusion {
    grid-template-columns: 1fr !important;
  }
  .page-inclus .pw-card--split-conclusion .split-media   { order: 1 !important; }
  .page-inclus .pw-card--split-conclusion .split-content { order: 2 !important; }
}


/* ─── ≤768px — FAQ 1 colonne ─────────────────────────────── */
@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr !important;
    padding-inline: var(--section-x);
    width: 100%;
    margin-inline: 0;
    box-sizing: border-box;
  }
  .page-home #faq .pw-section-hd {
    padding-inline: var(--section-x);
  }
}


/* ─── ≤640px — carousels + projets ──────────────────────── */
@media (max-width: 640px) {
  /* Flèches masquées, swipe tactile */
  .sp-carousel-arrow,
  .avis-carousel-arrow { display: none; }
  .sp-carousel-outer,
  .avis-carousel-outer { gap: 0; }

  /* Dots visibles */
  .sp-carousel-dots,
  .avis-carousel-dots { display: flex; }

  /* Swipe sur toute la carte */
  #spCarouselTrack,
  #avisCarouselTrack { touch-action: pan-y; user-select: none; }

  /* Projets : texte centré, cartes scroll horizontal */
  .projets-inner  { grid-template-columns: 1fr; gap: 24px; }
  .projets-left   { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .projets-grid   {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    padding-bottom: 8px;
  }
  .projets-grid::-webkit-scrollbar { display: none; }
  .projet-card {
    flex: 0 0 78vw !important;
    max-width: 300px;
    scroll-snap-align: start;
  }
}


/* ─── ≤560px — mobile complet ────────────────────────────── */
@media (max-width: 560px) {

  /* Strip */
  :root { --strip-h: 24px; }
  .strip {
    min-height: 0;
    padding: 5px 16px;
    font-size: 10.5px;
    line-height: 1.4;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .strip::-webkit-scrollbar { display: none; }
  .strip-rappel { display: none; }

  /* Prix hero — affichage mobile */
  .pw-hero-price--d { display: none !important; }
  .pw-hero-price--m {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 14px 0 16px;
  }
  .pw-hero-price--m .pw-hero-price-big      { font-size: 42px; letter-spacing: -2px; line-height: 1; }
  .pw-hero-price--m .pw-hero-price-duration { font-size: 13px; color: rgba(255,255,255,0.80); margin-top: 0; }
  .pw-hero-price--m .pw-hero-price-then     { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 0; }
  .pw-hero-price--m .pw-hero-price-engage   { font-size: 12px; font-weight: 700; color: #fff; margin-top: 0; }

  /* Hero index — 80vh plein écran */
  .page-home .pw-hero {
    margin-top: 0;
    min-height: 80svh;
    min-height: 80vh;
    padding: 0 18px 32px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
  }
  .page-home .pw-hero-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: calc(var(--nav-h) + 68px + 20px);
    width: 100%;
  }
  .page-home .pw-hero-copy   { display: flex; flex-direction: column; flex: 1; }
  .page-home .pw-hero-eyebrow { width: fit-content; display: inline-flex; align-self: flex-start; }
  .page-home .pw-hero-title  { font-size: clamp(34px, 8.5vw, 42px); margin-top: auto; margin-bottom: 0; }
  .page-home .pw-hero-sub    { font-size: 14px; color: rgba(255,255,255,0.95); margin-bottom: 0; }
  .page-home .pw-hero-overlay { background: rgba(0,0,0,0.10); }
  .page-home .pw-hero-actions {
    margin-top: auto;
    padding-top: 20px;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .page-home .pw-hero-actions .btn {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    min-width: 0;
    padding-inline: 12px;
  }

  /* Hero pages famille — 80vh plein écran */
  .site:not(.page-home) .pw-hero {
    margin-top: 0;
    min-height: 80svh;
    min-height: 80vh;
    padding: 0 18px 32px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
  }
  .site:not(.page-home) .pw-hero-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: calc(var(--nav-h) + 68px + 20px);
    width: 100%;
  }
  .site:not(.page-home) .pw-hero-copy    { display: flex; flex-direction: column; flex: 1; }
  .site:not(.page-home) .pw-hero-eyebrow { width: fit-content; display: inline-flex; align-self: flex-start; }
  .site:not(.page-home) .pw-hero-title   { font-size: clamp(32px, 8vw, 42px); margin-top: auto; margin-bottom: 0; }
  .site:not(.page-home) .pw-hero-sub     { font-size: 14px; color: rgba(255,255,255,0.95); margin-bottom: 0; }
  .site:not(.page-home) .pw-hero-overlay {
    background:
      linear-gradient(135deg, rgba(17,17,17,.74) 0%, rgba(17,17,17,.52) 100%),
      linear-gradient(to right, rgba(17,17,17,.68) 0%, rgba(17,17,17,.22) 55%, rgba(17,17,17,.68) 100%);
  }
  .site:not(.page-home) .pw-hero-actions {
    margin-top: auto;
    padding-top: 20px;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .site:not(.page-home) .pw-hero-actions .btn {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    min-width: 0;
    padding-inline: 12px;
  }

  /* Forfait grid — 1 colonne */
  .forfait-grid { grid-template-columns: 1fr; }

  /* Contact row — 1 colonne */
  .contact-row { grid-template-columns: 1fr; gap: 12px; }

  /* Contact callback — bouton centré */
  .contact-side-card--callback .contact-side-actions {
    margin-top: auto;
    margin-bottom: auto;
    padding-block: 20px;
  }

  /* Parrainage — image dessus, texte dessous */
  .parrainage-visual {
    display: flex;
    flex-direction: column;
    height: auto !important;
    overflow: visible;
    margin-inline: var(--section-x);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
  }
  .parrainage-img {
    height: 220px;
    width: 100%;
    margin-left: 0;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  .parrainage-overlay {
    position: static;
    transform: none;
    width: 100%;
    max-width: none;
    margin-top: 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 20px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(13,14,42,0.96);
  }
  .parrainage-title { font-size: 26px; letter-spacing: -1px; }
  .parrainage-cards { flex-direction: column; gap: 8px; }

  /* Footer — 2 colonnes */
  .footer-grid      { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand     { grid-column: 1 / -1; }
  .footer-recrute   { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.72); }
  .footer-recrute:hover { color: #fff; }

  /* FAQ — alignement */
  .faq-q { padding: 16px 0; font-size: 14px; }

  /* Rappel + Rappel parrainage — image dessus, formulaire dessous */
  .rappel-card {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }
  .rappel-right {
    order: 1;
    height: 280px;
    min-height: 0;
    overflow: hidden;
  }
  .rappel-left {
    order: 2;
    padding: 24px 20px;
    justify-content: flex-start;
  }
  /* Override spécifique rappel-parrainage */
  .page-rappel-parrainage .rappel-right {
    min-height: 0;
    height: 240px;
  }

  /* Page rappel : hauteur auto, pas de coupure */
  .rappel-page {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    align-items: flex-start;
    padding: 12px 16px 24px;
  }
  .rappel-shell {
    height: auto !important;
    justify-content: flex-start;
    max-width: 100%;
  }
  .rappel-topbar { margin-bottom: 10px; }

  /* Texte sur image masqué sur mobile — rappel + rappel-parrainage */
  .rappel-media-content,
  .rappel-right-overlay { display: none !important; }

  /* Page merci — hauteur auto, image dessus contenu dessous */
  .merci-page {
    height: auto;
    min-height: calc(100svh - 58px);
    min-height: calc(100vh - 58px);
    overflow: auto;
    align-items: flex-start;
    padding: 12px 16px 24px;
  }
  .merci-shell {
    height: auto;
    justify-content: flex-start;
    max-width: 100%;
  }
  .merci-card {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .merci-media {
    order: 1;
    height: 200px;
    overflow: hidden;
  }
  .merci-body {
    order: 2;
    overflow: visible;
    padding: 24px 20px;
  }
  .merci-media-content,
  .merci-media-overlay { display: none !important; }

  /* Page recrutement — défilement naturel, image dessus, formulaire dessous */
  .recrutement-page {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    align-items: flex-start;
    padding: 12px 16px 24px;
  }
  .recrutement-shell {
    height: auto !important;
    align-items: flex-start;
    max-width: 100%;
  }
  .recrutement-card {
    grid-template-columns: 1fr;
    height: auto !important;
    max-height: none !important;
    overflow: visible;
  }
  .recrutement-left {
    order: 1;
    min-height: 260px;
    padding: 24px 20px;
    overflow: hidden;
  }
  .recrutement-right {
    order: 2;
    overflow: visible;
    padding: 24px 20px;
  }
}


/* ─── ≥641px — nav + carousels tablette = desktop ──────── */
@media (min-width: 641px) {
  /* Nav complète */
  .nav-links  { display: flex; }
  .nav-cta    { display: inline-flex; }
  .nav-burger { display: none; }

  /* Flèches carousel visibles */
  .sp-carousel-arrow,
  .avis-carousel-arrow { display: inline-flex; }

  /* Dots masqués */
  .sp-carousel-dots,
  .avis-carousel-dots { display: none; }

  /* Projets — grid desktop garanti */
  .projets-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    overflow: visible;
  }
  .projet-card {
    flex: unset !important;
    width: auto !important;
    max-width: none !important;
  }
}


/* ─── 641–768px — footer tablette = desktop ─────────────── */
@media (min-width: 641px) and (max-width: 768px) {
  .footer-grid {
    grid-template-columns: minmax(220px, 1.2fr) repeat(4, minmax(0, 1fr));
    gap: 28px;
  }
  .footer-brand { grid-column: unset; order: unset; }
  .footer-col   { order: unset; }
}


/* ─── RECRUTEMENT — consentement lisible sur fond blanc ──── */
.page-recrutement .form-consent {
  color: #555;
}
.page-recrutement .form-consent a {
  color: #4a90e0;
}
