/* Mobile Styles - Responsive design pour smartphones et tablettes */

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  background: rgba(255,255,255,0.95);
  border: 2px solid #067F38;
  border-radius: 8px;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-menu-btn:hover {
  background: #067F38;
}

.mobile-menu-btn:hover .burger-icon span {
  background: white;
}

.burger-icon {
  width: 24px;
  height: 18px;
  position: relative;
  transform: rotate(0deg);
  transition: 0.3s ease-in-out;
}

.burger-icon span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: #067F38;
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.3s ease-in-out;
}

.burger-icon span:nth-child(1) { top: 0px; }
.burger-icon span:nth-child(2) { top: 7px; }
.burger-icon span:nth-child(3) { top: 14px; }

.mobile-menu-btn.active .burger-icon span:nth-child(1) {
  top: 7px;
  transform: rotate(135deg);
  background: white;
}

.mobile-menu-btn.active .burger-icon span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.mobile-menu-btn.active .burger-icon span:nth-child(3) {
  top: 7px;
  transform: rotate(-135deg);
  background: white;
}

.mobile-menu-btn.active {
  background: #067F38;
  border-color: #067F38;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 90%;
  max-width: 400px;
}

.mobile-menu a {
  display: block;
  color: white;
  font-size: 1.5em;
  font-weight: 500;
  text-decoration: none;
  padding: 20px;
  margin: 10px 0;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0.1);
}

.mobile-menu a:hover {
  background: #067F38;
  border-color: #067F38;
  transform: scale(1.05);
}

.mobile-bottom-panel {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 3px solid #067F38;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  padding: 15px 20px;
  z-index: 9999;
  text-align: center;
}

.mobile-contact-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mobile-contact-name {
  font-weight: 600;
  color: #067F38;
  font-size: 1.1em;
  margin: 0;
}

.mobile-contact-subtitle {
  font-size: 0.9em;
  color: #666;
  margin: 0;
}

.mobile-contact-button {
  background: #067F38;
  color: white;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95em;
  transition: all 0.2s ease;
  display: inline-block;
  margin-top: 5px;
}

.mobile-contact-button:hover {
  background: #055d29;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  border-bottom: 2px solid #067F38;
  padding: 15px 20px;
  text-align: center;
  z-index: 9998;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-header .logo {
  height: 45px;
  width: auto;
}

@media (max-width: 1536px) {
  .mobile-header { display: block !important; }
  .mobile-menu-btn { display: flex !important; }
  #topMenu { display: none !important; }
  
  body {
    min-width: auto !important;
    font-size: 16px;
    padding-top: 75px;
  }
  
  .content {
    width: 100% !important;
    max-width: 1000px !important;
    min-width: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 25px 60px 120px 60px !important;
    box-sizing: border-box;
  }
  
  h2 {
    font-size: 32px !important;
    margin-top: 80px !important;
    padding-bottom: 18px !important;
    text-align: center;
    scroll-margin-top: 90px;
  }
  
  .side-panel { display: none !important; }
  .custom-scrollbar-container { display: none !important; }
  .mobile-bottom-panel { display: block !important; }
}

@media (max-width: 768px) {
  .content {
    padding: 20px 20px 120px 20px !important;
    max-width: 100% !important;
  }
  
  h2 {
    font-size: 28px !important;
    margin-top: 60px !important;
    padding-bottom: 15px !important;
    scroll-margin-top: 90px;
  }
  
  .contact-method-btn {
    font-size: 0.8em !important;
    padding: 10px 12px !important;
    min-width: 90px !important;
    flex: 1 !important;
    margin: 0 2px !important;
  }
  
  .contact-methods {
    gap: 4px !important;
  }
  
  /* Correction des formulaires sur mobile */
  .form-row {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .form-group {
    min-width: auto !important;
    flex: none !important;
  }
  
  /* Cas spéciaux pour l'adresse - garder en ligne mais avec des largeurs adaptées */
  .form-row:has(.form-group[style*="flex: 0 0 100px"]) {
    flex-direction: row !important;
    gap: 10px !important;
  }
  
  .form-row:has(.form-group[style*="flex: 0 0 120px"]) {
    flex-direction: row !important;
    gap: 10px !important;
  }
  
  /* Ajustement des largeurs fixes pour mobile */
  .form-group[style*="flex: 0 0 100px"] {
    flex: 0 0 80px !important;
    min-width: 80px !important;
  }
  
  .form-group[style*="flex: 0 0 120px"] {
    flex: 0 0 90px !important;
    min-width: 90px !important;
  }
  
  /* Assurer que les inputs restent dans leurs conteneurs */
  .form-group input,
  .form-group select,
  .form-group textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Amélioration du groupe téléphone sur mobile */
  .phone-input-group {
    gap: 8px !important;
  }
  
  .country-select {
    flex: 0 0 85px !important;
  }
}
