.contact-container {
  box-sizing: border-box; /* Ajoute ceci pour inclure le padding dans max-width */
  max-width: 500px;
  margin: 20px auto;
  padding: 10px;
  background-color: #fafafa;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  font-family: 'Roboto', sans-serif;
}

#contactForm input, #contactForm textarea {
  width: 100%;
  margin-bottom: 12px;
  margin-top: 12px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

#contactForm #firstName,  #contactForm #message {
border: 1px solid #F3EA97;
}

#contactForm #firstName.empty,  #contactForm #message.empty {
  border: 3px solid #A40606;
}


#country[readonly] {
  background-color: #f0f0f0;
  cursor: not-allowed;
  color: #555;
}


#contactForm textarea {
  resize: vertical; /* extensible verticalement */
  min-height: 80px;
}

#attachments-section {
  overflow-x: auto;
  width: 100%; /* garantit que la largeur du parent est respectée */
}

#attachments-table {
  width: 100%;
  table-layout: fixed; /* force le respect absolu de la largeur */
  margin-bottom: 10px;
  border-collapse: collapse;
}

#attachments-table tr.file-selected {
/*  background-color: #e7f9e7;*/ /* vert très pâle */
  background-color: #EBEFF0; /* vert très pâle */
  transition: background-color 0.3s ease; /* transition douce facultative */
}

#attachments-table th, #attachments-table td {
  border: 1px solid #ddd;
  padding: 6px;
  text-align: center;
}

/* Première colonne : prend tout l'espace restant */
#attachments-table td:first-child,
#attachments-table th:first-child {
  width: auto;
}

/* Deuxième colonne (à droite) : prend seulement la place minimale */
#attachments-table td:last-child,
#attachments-table th:last-child {
  width: 5%; /* occupe l'espace minimal possible */
  white-space: nowrap; /* empêche les boutons d'aller à la ligne */
  text-align: center; /* optionnel : centre les boutons */
}

#attachments-table button {
  cursor: pointer;
}

/* ///////////////////////////////////////////////////// */

#addAttachmentBtn {
  font-family: 'Roboto', sans-serif; /* explicite la famille de police */
  font-size: 14px;                   /* taille identique et explicite */
  line-height: 1.2;                  /* hauteur de ligne explicite et harmonisée */
  box-sizing: border-box;            /* dimensionnement explicite incluant padding et border */
  margin-top:12px;
  margin-bottom:12px;
  cursor: pointer;
	
 border:none;

  /* Flexbox pour un centrage parfait */
  display: flex;
  justify-content: center;   /* Centrage horizontal */
  align-items: center;       /* Centrage vertical */
}


#addAttachmentBtn img.add-file-icon {
  max-height: 20px;                /* hauteur fixée à 40px */
  width: auto;               /* Largeur auto pour ratio intact */
  object-fit: contain;        /* évite la distorsion */
  vertical-align: middle;     /* alignement parfait avec le texte */
  pointer-events: none;       /* icône non cliquable individuellement */
}


/* ///////////////////////////////////////////////////// */
/* Bouton de sélection des pièces jointes */
.selectAttachmentBtn {
  opacity: 0;
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  overflow: hidden;
  z-index: -1;
}

/* Style sur le label qui remplace visuellement l'input caché */
label[for="selectAttachmentBtn"] {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}


/* Style sur l'image à l'intérieur du label */
label[for="selectAttachmentBtn"] img.select-file-icon {
  max-height: 20px; 
  width: auto;         
  object-fit: contain; 
  pointer-events: none; /* assure que le clic passe bien au label */
}

.selectAttachmentLabel {
  justify-content: flex-start; /* assure l'alignement gauche du label en flexbox */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}


#attachments-table td {
  position: relative; /* nécessaire pour contraindre position:absolute enfant */
  overflow: hidden; /* sécurité supplémentaire */
}

#attachments-table td:first-child {
  text-align: left;   /* aligne horizontalement à gauche */
  padding-left: 10px; /* ajoute éventuellement un peu d'espace pour l'esthétique */
}

.selected-filename {
  font-size: 0.9em;
  color: #555;
}

.select-file-icon {
  max-height: 20px; 
  width: auto;         
  object-fit: contain; 
  pointer-events: none;
}


/* ///////////////////////////////////////////////////// */


/* ///////////////////////////////////////////////////// */
/* Bouton de suppression des pièces jointes */
.removeAttachmentBtn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.removeAttachmentBtn img.remove-file-icon {
  max-height: 15px; 
  width: auto;         
  object-fit: contain; 
  pointer-events: none;
}
/* ///////////////////////////////////////////////////// */

#submitFormBtn {
  font-family: 'Roboto', sans-serif; /* explicite la famille de police */
  font-size: 14px;                   /* taille identique et explicite */
  line-height: 1.2;                  /* hauteur de ligne explicite et harmonisée */
  box-sizing: border-box;            /* dimensionnement explicite incluant padding et border */
}


#submitFormBtn {
  width: 100%;
  height: 62px;
  padding: 0 16px;
  background-color: #fff;
  border: 1px solid #ddd;
  color: #737473;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.9;
  display: flex;
  justify-content: center; 
  align-items: center;
  gap: 8px; /* espacement élégant entre icône et texte */
}


#submitFormBtn img.submit-icon {
  max-height: 40px;                /* hauteur fixée à 40px */
  width: auto;               /* Largeur auto pour ratio intact */
  object-fit: contain;        /* évite la distorsion */
  vertical-align: middle;     /* alignement parfait avec le texte */
  pointer-events: none;       /* icône non cliquable individuellement */
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  /* border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff; */
  border: 3px solid rgba(115, 116, 115, 0.3); /* gris clair pour l'anneau */
  border-top-color: #737473; /* gris foncé pour le spinner visible */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}


#submitFormBtn.submitting .spinner {
  display: inline-block;
}

#submitFormBtn.success {
  background-color: #28a745;
}

#submitFormBtn.error {
  background-color: #dc3545;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}




/*

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
*/
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



/* intl-tel-input : intégration propre avec tes styles existants */

.iti {
  width: 100%;
}

.iti__selected-flag {
  height: 100%;
  padding-left: 6px;
}

.iti input[type="tel"], #phone {
  width: 100%;
  padding-left: 50px !important; /* espace nécessaire au drapeau */
  height: 40px; /* ajuste selon tes besoins */
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid #ddd;
}


.iti__flag-container {
  left: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
}


/* ////////////////////////////////////////////
//////////////////////////////////////////// */
/* ========== SECTION GÉOLOCALISATION ========== */

/* Conteneur : aligne visuellement avec .contact-container */
#geo-container {
  max-width: 500px;           /* même largeur que le formulaire */
  margin: 20px auto 0px;        /* centrage + espace dessous */
  display: flex;
  flex-direction: column;
  lign-items: center; /* alignement central */
}

/* Bouton principal et bouton de fermeture */
#geoToggleBtn,
#geoCloseBtn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
}

#geoCloseBtn:hover {
  transform: scale(1.1); /* effet subtil d'agrandissement au survol */
}

/* Bouton Géolocalisation (activer) */
#geoToggleBtn img {
  height: 28px; /* ajuste cette hauteur à ton goût */
  width: auto;
  object-fit: contain;
}

/* Bouton Fermer la géolocalisation */
#geoCloseBtn img {
  height: 15px; /* ajuste cette hauteur individuellement */
  width: auto;
  object-fit: contain;
}


/* Style spécifique pour l'image "earth.svg" dans la nouvelle cellule du tableau */
#geoLinkCell img {
  height: 40px;         /* Taille exacte demandée */
  max-width: 100%; /* Évite tout débordement horizontal */
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  pointer-events: none; /* Empêche les interactions directes avec l'image pour que le clic soit sur le lien */
}

/* Cellule latitude et longitude */
#latCell, #lonCell {
  width: 80%;
  background-color: #f8f8f8; /* gris très clair */
  color: #555;
  font-size: 14px;
}

/* Première cellule (image Terre) */
#geoLinkCell {
  width: 10%;
  text-align: center;
  vertical-align: middle;
  padding: 5px;
  background-color: #f0f8ff; /* nuance bleutée claire agréable */
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

/* Dernière cellule (bouton fermer) */
#geoCloseCell {
  width: 10%;
  background-color: #fff5f5; /* léger ton rouge clair (fermeture) */
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}


/* Tableau des coordonnées : copie des règles #attachments-table */
.geo-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px; /* Espacement vertical moderne */
  margin: 10px auto;
  background-color: #f4f6f8; /* #fff */
  box-shadow: 0 3px 8px rgba(0,0,0,0.1); /* Ombre douce intégrée */
  border-radius: 10px; /* Coins arrondis modernes */
  overflow: hidden; /* empêche tout débordement */
}

.geo-table td {
  padding: 12px 8px;
  text-align: center;
  vertical-align: middle;
  font-family: 'Roboto', sans-serif;
  border: none; /* Suppression des bordures classiques */
}

/* Première colonne (lat / lon) occupe 95 % */
.geo-table td:first-child {
  width: 95%;
}

/* Cellule de fermeture (rowspan) occupe le reste */
.geo-table td:last-child {
  width: 5%;
  white-space: nowrap;
}

/* Style spécifique pour les liens des coordonnées */
.geo-table a {
  color: #6A7682;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.geo-table a:hover {
  color: #205b99; /* bleu légèrement foncé au survol */
  text-decoration: underline;
}
/*                                 */


#geoRefreshBtn {
  position: relative;
  cursor: pointer;
}

#geoRefreshBtn::after {
  content: '↻';
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 12px;
  background-color: rgba(255,255,255,0.9);
  color: #555;
  border-radius: 50%;
  padding: 1px 3px;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
  pointer-events: none;
}