/* =============================================
   MOBILE OPTIMISATION — AS PRÉVESSIN-MOËNS
   ============================================= */

/* ============================================
   1. HEADER / MENU — TOUJOURS EN HAUT (STICKY)
   ============================================ */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  background: rgba(26,31,46,0.98) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--orange);
}

/* Admin bar compensation */
.admin-bar .site-header {
  top: 32px !important;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px !important;
  }
  .admin-bar .mobile-nav {
    top: calc(72px + 46px) !important;
  }
}

/* Mobile nav au-dessus de tout */
.mobile-nav {
  z-index: 9998 !important;
  position: fixed !important;
  top: 72px !important;
  left: 0 !important;
  width: 100% !important;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
}

/* ============================================
   2. HERO — CORRECTION DÉCALAGE & MOBILE
   ============================================ */
.hero-content {
  position: relative !important;
  transform: none !important;
}

.hero {
  margin-top: 72px;
}

.admin-bar .hero {
  margin-top: calc(72px + 32px);
}

@media (max-width: 782px) {
  .admin-bar .hero {
    margin-top: calc(72px + 46px);
  }
}

/* ============================================
   3. LOGO HEADER — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .header-inner {
    height: 64px !important;
    padding: 0 16px !important;
  }
  .mobile-nav {
    top: 64px !important;
    max-height: calc(100vh - 64px);
  }
  .hero {
    margin-top: 64px !important;
  }
  .admin-bar .hero {
    margin-top: calc(64px + 46px) !important;
  }
  .site-logo img {
    height: 40px !important;
    width: auto !important;
  }
  .site-logo .logo-text {
    font-size: 0.95rem !important;
  }
  .site-logo .logo-text small {
    display: none !important;
  }
  .menu-toggle {
    display: flex !important;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
}

/* ============================================
   4. HERO BUTTONS — MOBILE
   ============================================ */
.hero-buttons {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
  }
  .hero-buttons a,
  .hero-buttons .btn,
  .hero-buttons .btn-premium,
  .hero-buttons .btn-outline-light {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    text-align: center;
  }
}

/* Bouton principal hero */
.hero-buttons .btn-premium {
  background: linear-gradient(45deg, #ff7a00, #ffb347);
  color: #000;
  padding: 15px 32px;
  font-weight: 700;
  border-radius: 50px;
}

/* ============================================
   5. HERO TEXTE — RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.1rem !important;
    line-height: 1.1;
  }
  .hero p {
    font-size: 1rem;
    padding: 0 8px;
  }
  .hero-content {
    padding: 40px 16px !important;
  }
  .hero-badge {
    font-size: 0.78rem;
    padding: 6px 14px;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.65rem !important;
  }
}

/* ============================================
   6. STATS BAR — MOBILE
   ============================================ */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .stat-number {
    font-size: 1.9rem !important;
  }
  .stat-label {
    font-size: 0.72rem;
  }
  .stat-item {
    padding: 12px 8px;
  }
}

/* ============================================
   7. SECTION TITRES — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.7rem !important;
  }
  .section-subtitle {
    font-size: 0.95rem;
    padding: 0 8px;
  }
  section {
    padding: 44px 0;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.4rem !important;
  }
}

/* ============================================
   8. ACTUALITÉS GRID — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }
  .news-card-body {
    padding: 16px;
  }
  .news-card-img {
    height: 170px;
  }
  .news-card-body h3 {
    font-size: 1.1rem;
  }
}

/* ============================================
   9. SCORE'N'CO WIDGET — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .scorenco-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .scorenco-card .scorenco-widget {
    min-height: 350px;
  }
  .scorenco-section {
    padding: 44px 0;
  }
}

/* ============================================
   10. CAROUSEL — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .carousel-wrapper {
    height: 240px !important;
  }
  .carousel-prev,
  .carousel-next {
    font-size: 1.8rem;
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .carousel-wrapper {
    height: 190px !important;
  }
  .carousel-prev { left: 6px; }
  .carousel-next { right: 6px; }
}

/* ============================================
   11. PARTENAIRES — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .partners-grid {
    gap: 28px !important;
    padding: 0 8px;
  }
  .partner-logo img {
    height: 65px !important;
    width: auto !important;
  }
}

/* ============================================
   12. FOOTER — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .site-footer {
    padding: 36px 0 0;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column !important;
    gap: 10px;
    text-align: center;
    padding: 16px 0;
  }
  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .footer-social {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .footer-col h4 {
    margin-bottom: 12px;
  }
}

/* ============================================
   13. ÉQUIPES LIST PAGE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .equipe-row {
    flex-direction: column !important;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 0;
  }
  .equipe-left {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 2px solid var(--orange);
    padding-right: 0 !important;
    padding-bottom: 16px;
  }
  .equipe-right {
    width: 100% !important;
    padding: 18px !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .equipe-meta h3 {
    font-size: 1.5rem !important;
  }
  .equipe-badge {
    width: 68px !important;
    height: 68px !important;
    font-size: 1.1rem !important;
  }
  .coach-photo-wrap {
    width: 90px;
    height: 90px;
    min-width: 90px;
  }
}

/* ============================================
   14. PAGE HEADER — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .page-header {
    padding: 96px 0 28px !important;
  }
  .page-header h1 {
    font-size: 1.8rem !important;
  }
  .histoire-hero {
    padding: 96px 0 36px !important;
  }
  .equipe-page-header {
    padding: 96px 0 24px !important;
  }
}

/* ============================================
   15. FORMULAIRE D'INSCRIPTION — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .inscription-layout {
    grid-template-columns: 1fr !important;
    gap: 24px;
    margin-top: 24px;
  }
  .inscription-form {
    padding: 20px 14px !important;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .tarifs-table th,
  .tarifs-table td {
    padding: 9px 10px !important;
    font-size: 0.8rem !important;
  }
  .tarifs-block {
    position: static !important;
  }
}

/* ============================================
   16. HISTOIRE PAGE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .histoire-intro,
  .histoire-block {
    padding: 18px 16px !important;
  }
  .histoire-section {
    padding: 44px 0 56px;
  }
}

/* ============================================
   17. DIRIGEANTS PAGE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .dirigeants-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }
  .dirigeant-detail {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }
  .dirigeant-detail-photo {
    position: static !important;
    max-width: 260px;
    margin: 0 auto;
  }
}

@media (max-width: 440px) {
  .dirigeants-grid {
    grid-template-columns: 1fr !important;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   18. GALERIE PHOTOS — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }
  .gallery-large {
    grid-column: span 2 !important;
  }
}

@media (max-width: 380px) {
  .gallery-grid {
    grid-template-columns: 1fr !important;
  }
  .gallery-large {
    grid-column: span 1 !important;
  }
}

/* ============================================
   19. CTA JOIN — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .cta-join {
    padding: 40px 0;
  }
  .cta-join h2 {
    font-size: 1.65rem !important;
  }
  .cta-join p {
    font-size: 0.95rem;
    padding: 0 8px;
  }
}

/* ============================================
   20. INSTAGRAM BANNER — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .instagram-banner {
    padding: 32px 0;
  }
  .instagram-banner .container {
    flex-direction: column;
    gap: 14px;
  }
  .instagram-banner p {
    font-size: 1.05rem;
    text-align: center;
  }
}

/* ============================================
   21. SINGLE ARTICLE — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .page-content {
    padding: 32px 0;
  }
  .page-content h2 {
    font-size: 1.45rem !important;
    margin: 24px 0 12px;
  }
  .page-content h3 {
    font-size: 1.2rem !important;
    margin: 18px 0 10px;
  }
  .page-content p {
    font-size: 0.95rem;
  }
}

/* ============================================
   22. SINGLE EQUIPE DETAIL — MOBILE
   ============================================ */
@media (max-width: 768px) {
  .equipe-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }
  .equipe-coach-card {
    position: static !important;
    max-width: 100% !important;
  }
  .equipe-detail-section {
    padding: 32px 0 48px;
  }
  .equipe-nav-links {
    justify-content: flex-start;
    gap: 7px;
    flex-wrap: wrap;
  }
  .equipe-nav-item {
    font-size: 0.78rem !important;
    padding: 7px 11px !important;
  }
  .equipe-hero-img {
    height: 240px !important;
  }
}

/* ============================================
   23. ANTI-OVERFLOW GLOBAL
   ============================================ */
body {
  overflow-x: hidden !important;
}

@media (max-width: 768px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ============================================
   24. BOUTONS TACTILES MINIMUM 44px
   ============================================ */
@media (max-width: 768px) {
  .btn,
  .btn-premium,
  .btn-outline-light,
  .menu-toggle {
    min-height: 44px;
  }
  .carousel-prev,
  .carousel-next {
    min-height: 44px;
    min-width: 44px;
  }
  .menu-toggle {
    padding: 10px 8px;
  }
}

/* ============================================
   25. CORRECTION ADMIN BAR
   ============================================ */
.admin-bar .site-header {
  top: 32px !important;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px !important;
  }
  .admin-bar .mobile-nav {
    top: calc(64px + 46px) !important;
  }
}
