/* ============================================================
   GM Engineering Systems — Feuille de styles partagée
   Utilisée par : index.html et rejoigneznous.html
   ============================================================ */

/* ---- Reset & Base ---------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

main {
  flex: 1;
}

a:focus, button:focus{
  outline: 3px solid #16213e 100% !important;
  outline-offset: 2px;
}

/* ---- Accessibilité --------------------------------------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* ---- Navbar ---------------------------------------------- */
.navbar {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

/* Bouton burger animé */
.navbar-toggler {
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  position: relative;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.burger-menu {
  width: 30px;
  height: 3px;
  background-color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

.burger-menu::before,
.burger-menu::after {
  content: '';
  width: 30px;
  height: 3px;
  background-color: white;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.burger-menu::before {
  top: -10px;
}

.burger-menu::after {
  top: 10px;
}

/* Animation quand le menu est ouvert */
.navbar-toggler[aria-expanded="true"] .burger-menu {
  background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .burger-menu::before {
  top: 0;
  transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .burger-menu::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---- Décorations titres ---------------------------------- */
.barre-titre {
  width: 200px;
  height: 4px;
  background: linear-gradient(to right, #0d6efd, #0dcaf0);
  margin: 15px auto 30px;
  border-radius: 2px;
}

.barre-sous-titre {
  width: 80px;
  height: 3px;
  background-color: #0d6efd;
  margin: 10px auto 15px;
  border-radius: 2px;
}

/* ---- Formulaire ------------------------------------------ */
#rdv-form,
#candidatureForm {
  position: relative;
}

/* Honeypot anti-bot — invisible pour les humains, piège pour les robots */
.honeypot-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.honeypot-wrap input {
  display: block;
  width: 0;
  height: 0;
  border: none;
  padding: 0;
  margin: 0;
}

.form-container {
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  max-width: 600px;
  margin: 0 auto;
}

.form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
}

/* ---- Bouton retour en haut ------------------------------- */
#scrollToTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #0d6efd;
  color: white;
  font-size: 24px;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(13,110,253,0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
}

#scrollToTopBtn:hover {
  background-color: #0b5ed7;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(13,110,253,0.5);
}

/* ---- Section CTA ----------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

/* ---- Footer ---------------------------------------------- */
.footer {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: white;
  padding: 40px 0 20px;
}

.footer a {
  color: #0dcaf0;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(38px, 6vw, 44px);
  height: clamp(38px, 6vw, 44px);
  border-radius: 50% !important;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  outline: none !important;
  color: #ffffff !important;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  text-decoration: none !important;
  box-shadow: none !important;
  transition: all 0.3s ease;
  line-height: 1;
}

/* Supprime la barre parasite sous les éventuelles images dans les boutons */
.social-icons a svg {
  display: block;
  vertical-align: middle;
}

.social-icons a:hover {
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(13,110,253,0.4) !important;
}

.social-icons a.facebook:hover  { background: #1877F2 !important; border-color: #1877F2 !important; }
.social-icons a.instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important; border-color: #e6683c !important; }
.social-icons a.whatsapp:hover  { background: #25D366 !important; border-color: #25D366 !important; }
.social-icons a.linkedin:hover  { background: #0A66C2 !important; border-color: #0A66C2 !important; }
.social-icons a.twitter:hover   { background: #000000 !important; border-color: #000000 !important; }
.social-icons a.youtube:hover   { background: #FF0000 !important; border-color: #FF0000 !important; }
.social-icons a.email:hover     { background: #0d6efd !important; border-color: #0d6efd !important; }

/* ---- Image bouton (footer) ------------------------------- */
.img-btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.1);
  max-width: 120px;
}

.img-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(13, 202, 240, 0.6);
}

/* ---- Alertes toast --------------------------------------- */
.alert {
  display: none;
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  animation: slideIn 0.5s ease-out;
}

/* ---- Animations ------------------------------------------ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.1); }
}

@keyframes slideIn {
  from { transform: translateX(400px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}

/* ---- Cards (services / valeurs) -------------------------- */
.service-card,
.card {
  transition: all 0.3s ease;
  border: none !important;
  height: 100%;
}

.service-card:hover,
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
}

.service-card img {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover img {
  transform: scale(1.05);
}

/* ============================================================
   index.html — Styles spécifiques
   ============================================================ */

/* Hero (index) */
.hero-section {
  position: relative;
  height: 500px;
  overflow: hidden;
  background-image: url('ImagesGM/HITRUST_r2_featured_image-1080x675.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: fadeInUp 1s ease-out;
}

/* Section À propos */
.about-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 60px 0;
}

/* Section Contact */
.contact-section {
  position: relative;
  min-height: 600px;
  background-image: url('ImagesGM/contact-us8.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 1;
}

.contact-section .container {
  position: relative;
  z-index: 2;
}

/* reCAPTCHA badge — repositionné sur desktop, masqué sur mobile/tablette */
.grecaptcha-badge {
  bottom: 100px !important;
}

@media (max-width: 991px) {
  .grecaptcha-badge {
    visibility: hidden !important;
  }
}

/* Textarea sans redimensionnement */
textarea.form-control {
  resize: none;
}

/* ============================================================
   rejoigneznous.html — Styles spécifiques
   ============================================================ */

/* Hero (rejoigneznous) */
.hero {
  position: relative;
  height: 500px;
  background-image: url('ImagesGM/Nous-rejoindre-Banner.jpg');
  background-attachment: fixed;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  animation: fadeInUp 1s ease-out;
}

/* Section Valeurs */
.values-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 60px 0;
}

.values-section h2 {
  font-weight: bold;
  margin-bottom: 3rem;
}

.card-icon {
  font-size: 3rem;
  color: #0d6efd;
  transition: transform 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.1);
}

/* Section CTA (rejoigneznous) */
.cta-section {
  padding: 60px 0;
}

/* Section Formulaire candidature */
.form-section {
  position: relative;
  min-height: 600px;
  background: url('ImagesGM/Nous-rejoindre-Banner.jpg') center/cover no-repeat;
  background-attachment: fixed;
  padding: 80px 0;
}

.form-section .form-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  /* index */
  .hero-title {
    font-size: 2rem;
  }

  .hero-section {
    height: 400px;
  }

  h1 {
    font-size: 1.8rem !important;
  }

  /* rejoigneznous */
  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    height: 50vh;
  }

  /* commun */
  .form-container {
    padding: 25px;
  }

  .service-card img {
    height: 180px;
  }

  .navbar-collapse {
    background-color: rgba(253, 253, 253, 0);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 10px;
  }
}
