/* Mobile Responsive CSS for Pythagore Sahara */

/* Hide menu link on desktop */
@media screen and (min-width: 769px) {
  a.menu-link {
    display: none !important;
  }
}

/* Body styles for menu state */
body.menu-open {
  overflow: hidden;
}

/* General Mobile Responsive Rules */
@media screen and (max-width: 768px) {
  /* Typography adjustments */
  body {
    font-size: 14px;
    line-height: 1.6;
  }
  
  h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
  }
  
  /* Container adjustments */
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Header mobile optimizations */
  .main-header {
    padding: 10px 0;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(12, 18, 40, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  
  .main-header .logo {
    font-size: 18px;
    text-align: left !important;
    padding-left: 20px !important;
    flex: 1;
    justify-content: flex-start;
    display: flex;
  }
  
  .main-header .logo a {
    padding: 5px 10px;
    text-align: left !important;
    display: block;
  }
  
  /* Navigation mobile menu */
  .main-nav {
    background: rgba(12, 18, 40, 0.95);
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    overflow-y: auto;
    padding: 20px 0;
  }
  
  .main-nav.active {
    left: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
  

  
  .main-menu {
    background: transparent;
    position: static;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2px 0;
    margin: 0;
    list-style: none;
  }
  
  .main-menu li {
    margin: 4px 0;
    text-align: center;
    width: 100%;
    display: block;
  }
  
  .main-menu li a {
    font-size: 12px;
    padding: 6px 10px;
    display: block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    border-radius: 5px;
  }
  
  .main-menu li a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ef7319;
    transform: scale(1.05);
  }
  
  /* Menu toggle button */
  a.menu-link {
    display: block !important;
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10000;
    background: rgba(12, 18, 40, 0.9) !important;
    border: 2px solid #fff !important;
    color: #fff !important;
    font-size: 18px;
    padding: 8px 12px !important;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
  }
  
  a.menu-link:hover {
    background: rgba(12, 18, 40, 1);
    transform: scale(1.1);
  }
  
  /* Main banner mobile adjustments */
  .main-banner {
    height: 100vh;
    min-height: 500px;
  }
  
  .main-banner .caption {
    padding: 20px;
    text-align: center;
  }
  
  .main-banner .caption img {
    width: 350px;
    height: 350px;
    margin-bottom: 20px;
  }
  
  .main-banner .caption h2 {
    font-size: 28px;
    margin-bottom: 20px;
  }
  
  .main-banner .caption h2 em {
    font-size: 24px;
  }
  
  /* Features section mobile */
  .features {
    padding: 20px 0;
    margin-top: -20px;
    position: relative;
    z-index: 10;
  }
  
  .features .row {
    display: block;
    margin-top: 10px;
  }
  
  .features .col-lg-4 {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .features-post {
    margin-bottom: 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    height: auto;
    min-height: 80px;
    display: block;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
  }
  
  .features-post:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(239, 115, 25, 0.3);
    transform: scale(1.02);
  }
  
  .features-post.expanded {
    min-height: auto;
    background: rgba(239, 115, 25, 0.1);
    border-color: rgba(239, 115, 25, 0.4);
    box-shadow: 0 4px 20px rgba(239, 115, 25, 0.2);
    transform: scale(1.01);
  }
  
  .features-content {
    padding: 0;
    text-align: center;
  }
  
  .features-content h4 {
    display: block !important;
    text-align: center;
    margin: 0;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
  }
  
  .features-content h4 i {
    display: inline-block !important;
    font-size: 24px;
    color: #fff;
    margin-right: 10px;
  }
  

  

  
  /* Hide text content on mobile by default */
  .features-content .content-hide {
    display: none !important;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
  }
  
  /* Show text when expanded */
  .features-post.expanded .features-content .content-hide {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
  }
  
  .features-content p {
    display: block !important;
    font-size: 12px;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 10px;
    text-align: justify;
  }
  
  .features-content .scroll-to-section a {
    color: #ef7319;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    padding: 5px 10px;
    border: 1px solid #ef7319;
    border-radius: 15px;
    transition: all 0.2s ease-in-out;
    display: inline-block;
  }
  
  .features-content .scroll-to-section a:hover {
    background: #ef7319;
    color: #0c1228;
  }
  
  /* Smooth scrolling for horizontal features */
  .features .row {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Hide scrollbar but keep functionality */
  .features .row::-webkit-scrollbar {
    display: none;
  }
  
  .features .row {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  
  /* Add some spacing indicators */
  .features .row::after {
    content: '';
    flex: 0 0 15px;
  }
  
  /* Why us section mobile */
  .why-us {
    padding: 40px 0;
  }
  
  .section-heading h2 {
    font-size: 24px;
    margin-bottom: 30px;
  }
  
  #tabs ul {
    margin-bottom: 30px;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    backdrop-filter: none !important;
    border: none !important;
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 0 30px 0 !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  #tabs ul li {
    margin: 8px 0;
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 50px !important;
  }
  
  #tabs ul li a {
    padding: 15px 25px;
    font-size: 16px;
    background: linear-gradient(135deg, rgba(239, 115, 25, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 2px solid rgba(239, 115, 25, 0.3);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100% !important;
    min-height: 50px !important;
    line-height: 1.2 !important;
  }
  
  #tabs ul li::before,
  #tabs ul li::after {
    display: none !important;
    content: none !important;
  }
  
  #tabs ul::before,
  #tabs ul::after {
    display: none !important;
    content: none !important;
  }
  
  /* Suppression complète de tous les indicateurs de liste */
  #tabs * {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
  }
  
  #tabs ul li * {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
  }
  
  /* Suppression spécifique des indicateurs sous les onglets */
  #tabs ul li {
    position: relative;
  }
  
  #tabs ul li::marker {
    display: none !important;
    content: none !important;
    font-size: 0 !important;
    width: 0 !important;
    height: 0 !important;
  }
  
  #tabs ul li::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Suppression des puces par défaut du navigateur */
  #tabs ul {
    -webkit-padding-start: 0 !important;
    -moz-padding-start: 0 !important;
    padding-inline-start: 0 !important;
  }
  
  #tabs ul li {
    -webkit-padding-start: 0 !important;
    -moz-padding-start: 0 !important;
    padding-inline-start: 0 !important;
    text-indent: 0 !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: auto !important;
    min-height: 50px !important;
    vertical-align: middle !important;
  }
  
  /* Suppression complète des puces pour tous les navigateurs */
  #tabs ul {
    counter-reset: none !important;
  }
  
  #tabs ul li {
    counter-increment: none !important;
  }
  
  /* Règle spécifique pour Safari et WebKit */
  #tabs ul li {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
  }
  
  /* Suppression complète des indicateurs de navigation sous les onglets */
  #tabs .ui-tabs-nav,
  #tabs .ui-tabs-nav li,
  #tabs .ui-tabs-nav li a {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
  }
  
  /* Suppression des indicateurs de navigation jQuery UI */
  #tabs .ui-tabs-nav li::before,
  #tabs .ui-tabs-nav li::after,
  #tabs .ui-tabs-nav li a::before,
  #tabs .ui-tabs-nav li a::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Suppression des marqueurs de navigation */
  #tabs .ui-tabs-nav li::marker {
    display: none !important;
    content: none !important;
  }
  
  /* Suppression des indicateurs de navigation par défaut */
  #tabs .ui-tabs-nav li {
    background: none !important;
    background-image: none !important;
  }
  
  /* Suppression de tous les éléments de navigation jQuery UI */
  #tabs .ui-tabs-nav,
  #tabs .ui-tabs-nav li,
  #tabs .ui-tabs-nav li a,
  #tabs .ui-tabs-nav li span {
    position: relative;
  }
  
  #tabs .ui-tabs-nav li::before,
  #tabs .ui-tabs-nav li::after,
  #tabs .ui-tabs-nav li a::before,
  #tabs .ui-tabs-nav li a::after,
  #tabs .ui-tabs-nav li span::before,
  #tabs .ui-tabs-nav li span::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    background-image: none !important;
  }
  
  /* Suppression des indicateurs de navigation globaux */
  #tabs *::before,
  #tabs *::after {
    content: none !important;
  }
  
  #tabs ul li a::before {
    content: '' !important;
  }
  
  #tabs ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(239, 115, 25, 0.2), transparent);
    transition: left 0.5s ease;
  }
  
  #tabs ul li a:hover::before {
    left: 100%;
  }
  
  #tabs ul li a:hover {
    background: linear-gradient(135deg, rgba(239, 115, 25, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(239, 115, 25, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 115, 25, 0.3);
  }
  
  #tabs ul li a.active {
    background: linear-gradient(135deg, rgba(239, 115, 25, 0.4) 0%, rgba(255, 255, 255, 0.15) 100%);
    border-color: #ef7319;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 115, 25, 0.4);
  }
  
  .tabs-content {
    padding: 25px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
  }
  
  .tabs-content img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
  }
  
  .tabs-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  }
  
  .tabs-content h4 {
    color: #ef7319;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
  }
  
  .tabs-content h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ef7319 0%, #f39c12 100%);
    border-radius: 2px;
  }
  
  .tabs-content p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    font-size: 14px;
    text-align: justify;
    padding: 0 15px;
  }

  /* Animation d'entrée pour les articles */
  .tabs-content article {
    animation: slideInUp 0.6s ease-out;
    position: relative;
  }
  
  .tabs-content article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef7319 0%, #f39c12 100%);
    border-radius: 0 0 15px 15px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }
  
  .tabs-content article.active::before {
    transform: scaleX(1);
  }

  @keyframes slideInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes tabPulse {
    0% {
      box-shadow: 0 6px 20px rgba(239, 115, 25, 0.4);
    }
    50% {
      box-shadow: 0 6px 20px rgba(239, 115, 25, 0.6);
    }
    100% {
      box-shadow: 0 6px 20px rgba(239, 115, 25, 0.4);
    }
  }
  
  #tabs ul li a.active {
    animation: tabPulse 2s infinite;
  }
  
  /* Correction spécifique de l'alignement des onglets */
  #tabs ul li {
    display: inline-block !important;
    margin: 0 5px !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 50px !important;
    width: calc(50% - 10px) !important;
    text-align: center !important;
    vertical-align: middle !important;
  }
  
  #tabs ul li a {
    display: inline-block !important;
    height: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 10px 20px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    text-align: center !important;
    line-height: 30px !important;
    vertical-align: middle !important;
    width: 100% !important;
    min-width: 120px !important;
  }
  
  /* Force l'affichage sur une seule ligne */
  #tabs ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }
  
  #tabs ul li {
    flex-shrink: 0 !important;
    flex-grow: 1 !important;
    flex-basis: 0 !important;
  }

  /* Effet de focus pour l'accessibilité */
  #tabs ul li a:focus {
    outline: 3px solid rgba(239, 115, 25, 0.5);
    outline-offset: 2px;
  }

  .tabs-content article:focus-within {
    outline: 3px solid rgba(239, 115, 25, 0.3);
    outline-offset: 3px;
  }
  
  /* Hexagonal gallery mobile */
  .coming-soon {
    padding: 40px 0;
  }
  
  #hexGrid {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .hex {
    width: 50%;
  }
  
  /* Fix for video background on mobile */
  #bg-video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  
  /* Improve form responsiveness */
  .contact form .row {
    margin: 0;
  }
  
  .contact form .col-md-6,
  .contact form .col-md-12 {
    padding: 0 10px;
  }
  
  /* Services section mobile */
  .courses {
    padding: 40px 0;
  }
  
  .courses .item {
    margin: 0 10px;
  }
  
  .courses .item img {
    width: 100%;
    height: 100%;
  }
  
  .courses .item .down-content {
    padding: 20px;
  }
  
  .courses .item .down-content h4 {
    font-size: 18px;
    margin-bottom: 10px;
  }
  
  .courses .item .down-content p {
    font-size: 14px;
    line-height: 1.5;
  }
  
  /* Carousel improvements for mobile */
  .owl-carousel .owl-nav {
    display: none;
  }
  
  .owl-carousel .owl-dots {
    margin-top: 20px;
  }
  
  .owl-carousel .owl-dot {
    width: 12px;
    height: 12px;
    margin: 0 5px;
  }
  
  /* Video section mobile */
  .video {
    padding: 40px 0;
  }
  
  .video .left-content {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .video .left-content h4 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .video .left-content p {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .video-item {
    margin: 0 auto;
    max-width: 100%;
  }
  
  .video-item figure img {
    width: 100%;
    height: auto;
  }
  
  /* Contact section mobile */
  .contact {
    padding: 40px 0;
  }
  
  .contact form {
    margin-bottom: 30px;
  }
  
  .contact form input,
  .contact form textarea {
    margin-bottom: 15px;
    padding: 12px;
    font-size: 14px;
  }
  
  .contact form button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
  }
  
  #map {
    height: 300px;
  }
  
  #map iframe {
    width: 100%;
    height: 100%;
  }
  
  /* Footer mobile */
  footer {
    padding: 20px 0;
    text-align: center;
  }
  
  footer p {
    font-size: 14px;
  }
  
  /* Icônes réseaux sociaux - Mobile */
  footer p {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .social-icons {
    margin-left: 0;
    margin-top: 10px;
  }
  
  .social-icon {
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 14px;
    margin: 0 5px;
  }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
  .main-banner .caption h2 {
    font-size: 24px;
  }
  
  .main-banner .caption h2 em {
    font-size: 20px;
  }
  
  .main-banner .caption img {
    width: 280px;
    height: 280px;
  }
  
  .section-heading h2 {
    font-size: 20px;
  }
  
  .features-content h4 {
    display: block !important;
    font-size: 12px;
    color: #ef7319;
    font-weight: 600;
  }
  
  
  .courses .item .down-content h4 {
    font-size: 16px;
  }
               .section.courses .owl-carousel .item img {
            width: 412px !important;
            height: 412px !important;
            margin: 0 auto;
            display: block;
        }

  .video .left-content h4 {
    font-size: 18px;
  }
  
  #hexGrid {
    max-width: 300px;
  }
  
  .hex {
    width: 50%;
  }
}

/* Extra small mobile devices */
@media screen and (max-width: 360px) {
  .main-banner .caption h2 {
    font-size: 20px;
  }
  
  .main-banner .caption h2 em {
    font-size: 18px;
  }
  
  .main-banner .caption img {
    width: 240px;
    height: 240px;
  }
  
  .main-header .logo {
    font-size: 16px;
    text-align: left !important;
    float: left !important;
    padding-left: 15px !important;
  }
  
  .section-heading h2 {
    font-size: 18px;
  }
  
  #hexGrid {
    max-width: 250px;
  }
  
  /* Even smaller menu items for very small screens */
  .main-menu li {
    margin: 3px 0;
  }
  
  .main-menu li a {
    font-size: 11px;
    padding: 4px 8px;
  }
  
  .main-menu {
    padding: 1px 0;
  }
}

/* Tablet optimizations */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .main-banner .caption h2 {
    font-size: 32px;
  }
  
  .main-banner .caption h2 em {
    font-size: 28px;
  }
  
  .main-banner .caption img {
    width: 250px;
    height: 250px;
  }
  
  .features-post {
    margin-bottom: 40px;
  }
  
  .courses .item {
    margin: 0 15px;
  }
  
  #hexGrid {
    width: 80%;
  }
}

/* Landscape orientation fixes */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .main-banner {
    height: 100vh;
  }
  
  .main-banner .caption {
    padding: 10px;
  }
  
  .main-banner .caption img {
    width: 100px;
    height: 100px;
  }
  
  .main-banner .caption h2 {
    font-size: 20px;
    margin-bottom: 10px;
  }
  
  .main-menu {
    padding: 2px 0;
  }
  
  .main-menu li {
    margin: 3px 0;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .main-menu li a {
    padding: 6px 10px;
  }
  
  .features-content h4 {
    padding: 15px 0;
  }
  
  .main-button a {
    padding: 15px 30px;
    font-size: 16px;
  }
  
  .contact form button {
    padding: 18px 30px;
  }
  
  #tabs ul li a {
    padding: 15px 25px;
  }
  
  /* Improve touch targets */
  .hexLink {
    min-height: 44px;
  }
  
  .features-content h4 {
    display: block !important;
    font-size: 12px;
    color: #ef7319;
    font-weight: 600;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .main-banner .caption img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print styles */
@media print {
  .main-header,
  .menu-link,
  .main-button,
  .contact form,
  #map {
    display: none !important;
  }
  
  .main-banner {
    height: auto;
    min-height: auto;
  }
  
  .main-banner .caption {
    position: static;
    padding: 20px;
  }
  
  .video-overlay {
    background: none !important;
  }
  
  #bg-video {
    display: none;
  }
}

/* Loading animation */
body:not(.loaded) {
  overflow: hidden;
}

body:not(.loaded)::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0c1228;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

body:not(.loaded)::after {
  content: 'Chargement...';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 18px;
  z-index: 100000;
}

/* Smooth transitions for all interactive elements */
* {
  transition: all 0.3s ease;
}

/* Improve focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid #ef7319;
  outline-offset: 2px;
}

/* Better button styling for mobile */
.main-button a,
.contact form button {
  border-radius: 25px;
  box-shadow: 0 4px 15px rgba(239, 115, 25, 0.3);
  transition: all 0.3s ease;
}

.main-button a:hover,
.contact form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 115, 25, 0.4);
}

/* Improve image loading */
img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

img.loaded {
  opacity: 1;
}

/* Better spacing for mobile */
.section {
  padding: 60px 0;
}

@media screen and (max-width: 768px) {
  .section {
    padding: 40px 0;
  }
} 

/* ===== SECTION SERVICES AMÉLIORATIONS MOBILE SEULEMENT ===== */

/* Responsive pour mobile seulement */
@media screen and (max-width: 768px) {
  /* Animation des cartes de services sur mobile */
  section.courses .item {
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: #fff;
  }
  
  /* Désactiver les liens dans la section courses */
  section.courses .item a,
  section.courses .item a:hover,
  section.courses .item a:focus,
  section.courses .item a:visited,
  section.courses a,
  section.courses .item * a {
    pointer-events: none !important;
    cursor: default !important;
    text-decoration: none !important;
    color: inherit !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
  }
  
  /* Désactiver complètement la section courses */
  section.courses {
    pointer-events: none !important;
  }
  
  section.courses .item {
    pointer-events: none !important;
  }
  
  section.courses .item * {
    pointer-events: none !important;
  }

  section.courses .item.animate {
    transform: translateY(0);
    opacity: 1;
  }

  /* Effet hover sur les cartes mobile */
  section.courses .item:hover,
  section.courses .item:focus,
  section.courses .item:active {
    transform: translateY(0) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    cursor: default !important;
    pointer-events: none !important;
  }

  /* Amélioration des images mobile */
  section.courses .item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.4s ease;
    border-radius: 12px 12px 0 0;
  }

  section.courses .item:hover img,
  section.courses .item:focus img,
  section.courses .item:active img {
    transform: scale(1) !important;
    pointer-events: none !important;
  }

  /* Amélioration du contenu mobile */
  section.courses .item .down-content {
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 0 0 12px 12px;
    position: relative;
  }

  section.courses .item .down-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef7319 0%, #f39c12 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }

  section.courses .item:hover .down-content::before {
    transform: scaleX(1);
  }

  /* Amélioration des titres mobile */
  section.courses .item .down-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
  }

  section.courses .item .down-content h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #ef7319;
    transition: width 0.3s ease;
  }

  section.courses .item:hover .down-content h4::after {
    width: 50px;
  }

  /* Amélioration du texte mobile */
  section.courses .item .down-content p {
    color: #6c757d;
    line-height: 1.6;
    font-size: 13px;
    margin-bottom: 20px;
  }

  /* Amélioration du carousel mobile */
  section.courses .owl-carousel {
    padding: 15px 0;
  }

  section.courses .owl-carousel .owl-dots {
    margin-top: 20px;
  }

  section.courses .owl-carousel button.owl-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
  }

  section.courses .owl-carousel button.owl-dot:hover {
    background: rgba(239, 115, 25, 0.7);
    transform: scale(1.2);
  }

  section.courses .owl-carousel button.owl-dot.active {
    background: #ef7319;
    border-color: #fff;
    transform: scale(1.3);
  }

  /* Masquer la navigation sur mobile */
  section.courses .owl-carousel .owl-nav {
    display: none !important;
  }

  /* Animation d'entrée pour les cartes mobile */
  @keyframes slideInUp {
    from {
      transform: translateY(50px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  section.courses .item.animate {
    animation: slideInUp 0.6s ease forwards;
  }

  /* Effet de brillance au survol mobile */
  section.courses .item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
    pointer-events: none;
  }

  section.courses .item:hover::before {
    left: 100%;
  }

  /* Indicateur de catégorie mobile */
  section.courses .item .category-indicator {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(239, 115, 25, 0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
    backdrop-filter: blur(10px);
  }

  /* Amélioration de l'accessibilité mobile */
  section.courses .item:focus-within {
    outline: 3px solid #ef7319;
    outline-offset: 2px;
  }
}

/* ===== SECTION VIDÉO AMÉLIORATIONS MOBILE SEULEMENT ===== */

/* Responsive pour mobile seulement */
@media screen and (max-width: 768px) {
  /* Améliorations générales de la section vidéo */
  section.video {
    position: relative;
    overflow: hidden;
    padding: 40px 0;
  }

  section.video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(239, 115, 25, 0.1) 0%, rgba(23, 34, 56, 0.95) 100%);
    z-index: 1;
  }

  section.video .container {
    position: relative;
    z-index: 2;
  }

  /* Amélioration du contenu texte */
  section.video .left-content {
    text-align: center;
    margin-bottom: 30px;
  }

  section.video .left-content span {
    display: inline-block;
    background: linear-gradient(135deg, #ef7319 0%, #f39c12 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(239, 115, 25, 0.3);
  }

  section.video .left-content h4 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.3;
  }

  section.video .left-content h4 em {
    color: #ef7319;
    font-style: normal;
    font-weight: 800;
  }

  section.video .left-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: justify;
  }

  /* Amélioration du bouton */
  section.video .main-button a {
    display: inline-block;
    background: linear-gradient(135deg, #ef7319 0%, #f39c12 100%);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(239, 115, 25, 0.4);
    border: 2px solid transparent;
  }

  section.video .main-button a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 115, 25, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
  }

  /* Amélioration de l'élément vidéo */
  section.video .video-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: all 0.4s ease;
  }

  section.video .video-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  }

  /* Amélioration de la légende vidéo */
  section.video .video-caption {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(239, 115, 25, 0.9) 0%, rgba(243, 156, 18, 0.9) 100%);
    color: #fff;
    padding: 15px 20px;
    text-align: center;
    z-index: 3;
  }

  section.video .video-caption h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  /* Amélioration de la figure vidéo */
  section.video .video-item figure {
    position: relative;
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
  }

  section.video .video-item figure img {
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.4s ease;
  }

  section.video .video-item:hover figure img {
    transform: scale(1.05);
  }

  /* Amélioration du bouton play */
  section.video .video-item figure a.play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(239, 115, 25, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 4;
  }

  section.video .video-item figure a.play::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
    margin-left: 5px;
  }

  section.video .video-item figure a.play:hover {
    background: #ef7319;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 30px rgba(239, 115, 25, 0.5);
  }

  /* Style pour le bouton play mobile */
  section.video .play-button-mobile {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(239, 115, 25, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 4;
    border: 3px solid rgba(255, 255, 255, 0.3);
  }

  section.video .play-button-mobile:hover {
    background: #ef7319;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 30px rgba(239, 115, 25, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
  }

  section.video .play-button-mobile i {
    color: #fff;
    font-size: 24px;
    margin-left: 3px;
  }

  /* Animation d'entrée pour la section vidéo */
  @keyframes fadeInUp {
    from {
      transform: translateY(30px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  section.video .left-content {
    animation: fadeInUp 0.8s ease-out;
  }

  section.video .video-item {
    animation: fadeInUp 0.8s ease-out 0.2s both;
  }

  /* Effet de brillance au survol */
  section.video .video-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
    z-index: 2;
    pointer-events: none;
  }

  section.video .video-item:hover::before {
    left: 100%;
  }

  /* Amélioration de l'accessibilité */
  section.video .video-item:focus-within {
    outline: 3px solid #ef7319;
    outline-offset: 3px;
  }

  /* Indicateur de chargement */
  section.video .video-loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
  }

  section.video .video-loading-indicator .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(239, 115, 25, 0.3);
    border-radius: 50%;
    border-top-color: #ef7319;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }
}

/* Lightbox personnalisée - MOBILE SEULEMENT */
@media screen and (max-width: 768px) {
  .custom-lightbox-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 9998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
  }
  
  .custom-lightbox-image {
    max-width: 90vw !important;
    max-height: 90vh !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .custom-lightbox-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    display: block !important;
  }
  
  /* Cacher la lightbox personnalisée sur PC */
  @media screen and (min-width: 769px) {
    .custom-lightbox-overlay {
      display: none !important;
    }
  }
}

/* Styles spécifiques pour iPhone 12 Pro et écrans mobiles similaires */
@media screen and (max-width: 428px) {
  #tabs ul {
    -webkit-column-count: 1 !important;
    -moz-column-count: 1 !important;
    column-count: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 10px !important;
  }

  #tabs ul li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    min-height: 40px !important;
  }

  #tabs ul li a {
    font-size: 14px !important;
    padding: 12px 20px !important;
    min-height: 40px !important;
    border-radius: 8px !important;
    letter-spacing: 0.5px !important;
    line-height: 1.3 !important;
  }

  #tabs ul li a:after {
    width: 8px !important;
    height: 8px !important;
    bottom: -2px !important;
  }

  #tabs ul li a:before {
    width: 20px !important;
    height: 20px !important;
    bottom: -3px !important;
  }

  #tabs ul .ui-tabs-active a:after {
    width: 12px !important;
    height: 12px !important;
  }

           /* Styles pour le titre "Pythagore Sahara" sur iPhone 12 Pro */
         .main-banner .caption {
           text-align: center !important;
           width: 100% !important;
           padding: 0 15px !important;
         }

         .main-banner .caption h2 {
           font-size: 28px !important;
           margin-top: 20px !important;
           margin-bottom: 20px !important;
           letter-spacing: 0.8px !important;
           text-align: center !important;
           line-height: 1.3 !important;
         }

         .main-banner .caption h2 em {
           font-size: 26px !important;
           color: #e2722a !important;
         }

         .main-banner .caption img {
           width: 280px !important;
           height: 280px !important;
           margin-bottom: 20px !important;
         }
}

/* Styles pour écrans très petits (iPhone SE, etc.) */
@media screen and (max-width: 375px) {
  #tabs ul li a {
    font-size: 13px !important;
    padding: 10px 15px !important;
    min-height: 35px !important;
  }
  
  #tabs ul li a:after {
    width: 6px !important;
    height: 6px !important;
  }
  
  #tabs ul li a:before {
    width: 18px !important;
    height: 18px !important;
  }
  
  #tabs ul .ui-tabs-active a:after {
    width: 10px !important;
    height: 10px !important;
  }
}

/* Styles pour écrans moyens (iPhone 12, 13, etc.) */
@media screen and (min-width: 429px) and (max-width: 767px) {
  #tabs ul {
    -webkit-column-count: 3 !important;
    -moz-column-count: 3 !important;
    column-count: 3 !important;
    gap: 8px !important;
    padding: 0 15px !important;
  }
  
  #tabs ul li a {
    font-size: 12px !important;
    padding: 10px 12px !important;
    min-height: 45px !important;
    letter-spacing: 0.3px !important;
  }
  
  #tabs ul li a:after {
    width: 7px !important;
    height: 7px !important;
  }
  
  #tabs ul li a:before {
    width: 22px !important;
    height: 22px !important;
  }
  
  #tabs ul .ui-tabs-active a:after {
    width: 11px !important;
    height: 11px !important;
  }
}

/* Amélioration de l'espacement et de la lisibilité */
@media screen and (max-width: 767px) {
  #tabs {
    margin-bottom: 20px !important;
  }
  
  .tabs-content {
    margin-top: 30px !important;
  }
  
  #tabs h4 {
    font-size: 24px !important;
    margin-bottom: 20px !important;
  }
  
  #tabs p {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }
}

/* ===== SECTION NOS ESPACES - AMÉLIORATIONS MOBILE SEULEMENT ===== */

/* Responsive pour mobile seulement */
@media screen and (max-width: 768px) {
  /* Améliorations générales de la section nos espaces */
  section.coming-soon {
    padding: 40px 0;
    background-image: url(../images/choosing-bg.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #172238;
    position: relative;
    overflow: hidden;
  }

  section.coming-soon::before {
    display: none;
  }

  section.coming-soon .col-md-12 {
    position: relative;
    z-index: 2;
  }

  /* Amélioration du titre */
  section.coming-soon .section-heading {
    text-align: center;
    margin-bottom: 10px;
  }

  section.coming-soon .section-heading h2 {
    margin-top: 100px;
    position: relative;
    font-size: 28px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 1px;
    display: inline-block;
    padding: 15px 20px;
    border: 2px solid rgba(250,250,250,0.1);
  }

  section.coming-soon .section-heading h2:before {
    width: 1px;
    height: 100px;
    background-color: rgba(250,250,250,0.1);
    position: absolute;
    top: -102px;
    content: '';
    left: 50%;
    transform: translate(-50%);
  }

  section.coming-soon .section-heading h2::after {
    display: none;
  }

  /* Amélioration de la grille hexagonale */
  section.coming-soon .grid {
    position: relative;
    z-index: 2;
    padding: 20px 0;
  }

  #hexGrid {
    width: 100% !important;
    max-width: 400px !important;
    margin: 0 auto !important;
    padding: 20px 10px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
  }

  /* Amélioration des hexagones individuels */
  .hex {
    width: calc(50% - 10px) !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .hexIn {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: visible !important;
    transform: none !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s ease !important;
  }

  .hex::after {
    content: '';
    display: block;
    padding-bottom: 115% !important; /* Ratio pour hexagone mobile */
  }

  /* Correction pour l'affichage des images */
  .hex .hexIn * {
    visibility: visible !important;
    opacity: 1 !important;
  }

  .hexIn {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: visible !important;
    transform: none !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s ease !important;
  }

  .hexLink {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    transform: none !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  /* Amélioration des images */
  .hex .img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    border-radius: 12px !important;
    transition: all 0.4s ease !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
  }

  /* Effets de survol améliorés */
  .hex:hover .hexIn {
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 35px rgba(239, 115, 25, 0.4) !important;
  }

  .hex:hover .img {
    transform: scale(1.1) !important;
  }

  /* Overlay au survol */
.hex .overlay {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: all 0.4s ease;
  border-radius: 12px;
  z-index: 2;
  pointer-events: none;
}

  .hex:hover .overlay {
    opacity: 1;
  }

  /* Icône de zoom au survol */
  .hex .zoom-icon {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 24px;
    color: #fff;
    z-index: 3;
    transition: all 0.4s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
  }

  .hex:hover .zoom-icon {
    transform: translate(-50%, -50%) scale(1);
  }

  /* Animation d'entrée pour les hexagones */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hex {
    animation: fadeInUp 0.6s ease-out;
  }

  .hex:nth-child(1) { animation-delay: 0.1s; }
  .hex:nth-child(2) { animation-delay: 0.2s; }
  .hex:nth-child(3) { animation-delay: 0.3s; }
  .hex:nth-child(4) { animation-delay: 0.4s; }
  .hex:nth-child(5) { animation-delay: 0.5s; }
  .hex:nth-child(6) { animation-delay: 0.6s; }
  .hex:nth-child(7) { animation-delay: 0.7s; }
  .hex:nth-child(8) { animation-delay: 0.8s; }
  .hex:nth-child(9) { animation-delay: 0.9s; }
  .hex:nth-child(10) { animation-delay: 1.0s; }
  .hex:nth-child(11) { animation-delay: 1.1s; }
  .hex:nth-child(12) { animation-delay: 1.2s; }
  .hex:nth-child(13) { animation-delay: 1.3s; }
  .hex:nth-child(14) { animation-delay: 1.4s; }

  /* Effet de brillance au survol */
  .hex .hexIn .shine {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
    z-index: 1;
    pointer-events: none;
  }

  .hex:hover .hexIn .shine {
    left: 100%;
  }

  /* Amélioration de l'accessibilité */
  .hex:focus-within {
    outline: 3px solid #ef7319;
    outline-offset: 3px;
  }

  /* Indicateur de chargement */
  .hex .loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
  }

  .hex .loading-indicator .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(239, 115, 25, 0.3);
    border-radius: 50%;
    border-top-color: #ef7319;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* Optimisation pour les écrans très petits */
  @media screen and (max-width: 480px) {
    #hexGrid {
      max-width: 350px !important;
      gap: 8px !important;
      padding: 15px 8px !important;
    }

    .hex {
      width: calc(50% - 8px) !important;
    }

    section.coming-soon .section-heading h2 {
      font-size: 22px;
      padding: 8px 12px;
    }

    section.coming-soon .section-heading h2:before {
      height: 60px;
      top: -62px;
    }

    .hex::after {
      content: '🔍';
      font-size: 20px;
    }
  }

  /* Optimisation pour les écrans moyens */
  @media screen and (min-width: 481px) and (max-width: 768px) {
    #hexGrid {
      max-width: 450px !important;
      gap: 12px !important;
      padding: 25px 15px !important;
    }

    .hex {
      width: calc(50% - 12px) !important;
    }

    section.coming-soon .section-heading h2 {
      font-size: 24px;
      padding: 10px 15px;
    }

    section.coming-soon .section-heading h2:before {
      height: 60px;
      top: -62px;
    }
  }

  /* Amélioration de la performance */
  .hex {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  /* Optimisation pour les appareils à écran tactile */
  @media (hover: none) and (pointer: coarse) {
    .hex:hover .hexIn {
      transform: translateY(-4px) !important;
    }

    .hex:hover .img {
      transform: scale(1.05) !important;
    }

    .hex::after {
      content: '👆';
      font-size: 20px;
    }
  }

  /* Amélioration de la navigation tactile */
  .hexLink {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Effet de pression tactile */
  .hex:active .hexIn {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(239, 115, 25, 0.3) !important;
  }

  .hex:active .img {
    transform: scale(1.02) !important;
  }
}

/* ===== LIGHTBOX AMÉLIORÉE POUR MOBILE ===== */

@media screen and (max-width: 768px) {
  .custom-lightbox-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-image: url(../images/choosing-bg.jpg) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-color: #172238 !important;
    z-index: 9998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  .custom-lightbox-image {
    max-width: 95vw !important;
    max-height: 95vh !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
  }

  .custom-lightbox-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    display: block !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s ease !important;
  }

  /* Bouton de fermeture pour la lightbox */
  .custom-lightbox-close {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(239, 115, 25, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 24px !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  }

  .custom-lightbox-close:hover {
    background: #ef7319 !important;
    transform: scale(1.1) !important;
  }

  /* Indicateur de navigation */
  .custom-lightbox-nav {
    position: absolute !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 10px !important;
    z-index: 9999 !important;
  }

  .custom-lightbox-nav button {
    width: 40px !important;
    height: 40px !important;
    background: rgba(239, 115, 25, 0.8) !important;
    border: none !important;
    border-radius: 50% !important;
    color: #fff !important;
    font-size: 18px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
  }

  .custom-lightbox-nav button:hover {
    background: #ef7319 !important;
    transform: scale(1.1) !important;
  }

  /* Animation d'entrée pour la lightbox */
  .custom-lightbox-overlay {
    animation: fadeIn 0.3s ease-out !important;
  }

  .custom-lightbox-image {
    animation: zoomIn 0.3s ease-out !important;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes zoomIn {
    from {
      opacity: 0;
      transform: scale(0.8);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
}
