.container {
  width: auto;
  max-width: 1000px;
  padding: 5px;
  height: auto;
  margin: 0 auto;
  margin-top: 5px;

  @media (max-width: 767px) {
    width: 100%;
    padding: 5px;
    margin-top: 220px;
  }
}

#info-titre {
  position: relative;
  font-family: Poppins, Arial, sans-serif;
  width: 500px;
  margin: 5px auto;
  text-align: center;

  @media (max-width: 768px) {
    font-size: 14px;
    margin: 10px;
  }
}

#info-titre h1 {
  font-size: 24px;
  color: var(--color-titre-ctc);
  font-size: 24px;
  margin-bottom: 10px;

  @media (max-width: 767px) {
    font-size: 18px;
  }
}

#info-titre p {
  margin: 4px 0;
  padding: 0;
  font-size: 12px;
  font-style: italic;
  color: var(--color-sous-titre-ctc);
  text-shadow: 2px 2px 5px black;

  @media (max-width: 767px) {
    font-size: 10px;
  }
}

/* --- BASE : toutes les lignes du formulaire --- */
/* --- Style des labels --- */
.formrdv {
  width: 1000px;
  margin: 0 auto;

  @media (max-width: 767px) {
    width: 95%;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  /* Label au-dessus du champ */
  gap: 0.3rem;
}

/* --- Style des labels --- */
.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-label);
  font-weight: var(--wei-label);
  margin-bottom: 2px;
}

.form-group .aLaLigne {
  font-size: 8px;
  font-style: italic;
  color: gray;
}

/* --- Style des champs (pour qu'ils remplissent la cellule) --- */
.form-group input,
.form-group select,
.form-group textarea,
.form-group li {
  background-color: rgba(0, 57, 54, 0.45);
  color: yellow;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-group button {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}

.form-group select {
  /* Supprime la flèche et le style natif du système */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Là, la hauteur fonctionne enfin ! */
  height: 50px;
  padding: 0 35px 0 15px;
  /* Espace à droite pour recréer une flèche */
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;

  /* Recréer une jolie flèche vers le bas en SVG (optionnel) */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
}

.form-group textarea {
  resize: vertical;
}

.form-group button {
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  padding: 0.75rem;
}


.form-row {
  display: grid;
  gap: 1rem;
  /* Espace entre les champs */
  margin-bottom: 1rem;
}

/* --- LIGNE 1 : Prénom (30%) / Nom (1fr = 70%) --- */
.row-l1 {
  grid-template-columns: 30% 1fr;
}

/* --- LIGNE 2 : Téléphone (30%) / Email (1fr = 70%) --- */
.row-l2 {
  grid-template-columns: 30% 1fr;
}

/* --- LIGNE 3 : Adresse (1fr = 100%) --- */
.row-l3 {
  grid-template-columns: 1fr;
}

/* --- LIGNE 4 : Code postal (15%) / Ville (1fr) / Pays (1fr) --- */
/* Les deux '1fr' se partagent équitablement les 85% restants (42.5% chacun) */
.row-l4 {
  grid-template-columns: 25% 1fr 1fr;
}

/* --- LIGNE 5 : Message (1fr = 100%) --- */
.row-l5 {
  grid-template-columns: 1fr;
}

/* --- LIGNE 6 : Bouton (1fr = 100%) --- */
.row-l6 {
  grid-template-columns: 1fr;
  margin-top: 20px;
  /* Ajout d'un espace au-dessus du bouton */
}

/* --- Pour que les champs remplissent bien leur cellule --- */
.form-row input,
.form-row select,
.form-row textarea,
.form-row button {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem;
  border: 1px solid #acacac83;
  border-radius: 8px;
  font-size: 14px;
}

.form-row button {
  margin-top: 2rem;
  width: 100%;
  padding: 1rem;
  background-color: #0a2d78;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.form-row button:hover {
  background-color: rgb(10, 88, 10);
  color: rgb(255, 255, 0);
  font-weight: 900;
  text-shadow: 1px 1px 2px black;
}

.form-row button:active {
  background-color: red;
  color: white;
  text-shadow: 1px 1px 2px black;
}

/* --- MODE MOBILE (moins de 768px) : TOUT EN 1 SEULE COLONNE --- */
@media (max-width: 768px) {

  .form-row,
  .row-l1,
  .row-l2,
  .row-l3,
  .row-l4,
  .row-l5,
  .row-l6 {
    grid-template-columns: 1fr !important;
    /* Force une colonne unique */
  }
}

.container-InfoRemarque {
  display: none;
}

/* ---------- Responsive : moins de 768px ---------- */
@media (max-width: 767px) {

  .container-1,
  .container-2,
  .container-3 {
    grid-template-columns: 1fr;
    /* une seule colonne */
  }
}

/* Ajoutez cette CSS pour une transition douce */
label[for="ville"],
label[for="pays"] {
  transition: color 0.3s ease;
}

label[for="ville"].info,
label[for="pays"].info {
  color: #0066cc;
  font-style: italic;
}

label[for="ville"].error,
label[for="pays"].error {
  color: #cc0000;
  font-weight: bold;
}

label[for="ville"].success,
label[for="pays"].success {
  color: #006600;
}

/* custom-select-container */
.custom-select-container {
  position: relative;
  width: 100%;
}

.custom-select-selected {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-select-selected img.flag-icon {
  width: 20px;
  height: auto;
  margin-right: 8px;
}

.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.custom-select-option {
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-select-option:hover {
  background: #ffff00;
  color: #000000;
}

.custom-select-option img.flag-icon {
  width: 20px;
  height: auto;
}

/* Conteneur relatif pour le champ de saisie */
.search-container {
  position: relative;
  /* Important : le point de référence */
  width: 100%;
}

/* Liste des suggestions */
#suggestions {
  position: absolute;
  /* Sort du flux normal */
  left: 0;
  /* Aligné à gauche du champ */
  top: 100%;
  /* Juste en dessous du champ */
  width: 100%;
  /* Prend la largeur du champ */
  min-width: 300px;
  /* Largeur minimum (ajustez) */
  max-width: 500px;
  /* Largeur maximum (ajustez) */
  background: rgba(28, 131, 2, 0.381);
  border: 1px solid #00672e;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 9999;
  /* Passe au-dessus de tout */
  display: none;
  /* Caché par défaut */
}

/* Pour que les éléments de la liste ne soient pas coupés */
#suggestions li {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  white-space: nowrap;
  /* Empêche le texte de passer à la ligne */
  overflow: hidden;
  text-overflow: ellipsis;
  /* Ajoute "..." si trop long */
}

/* Pour les noms de villes longs, on peut autoriser l'ellipsis */
#suggestions .city-name {
  flex: 1;
  min-width: 0;
  /* Permet de réduire */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Pour le code postal */
#suggestions .postal-code {
  flex-shrink: 0;
  /* Ne se réduit pas */
  margin-left: 10px;
  color: #030202;
  font-size: 13px;
}

/* Pour le drapeau */
#suggestions .flag {
  flex-shrink: 0;
  /* Ne se réduit pas */
  width: 30px;
  height: 20px;
  margin-right: 10px;
  border-radius: 2px;
  border: 1px solid #ddd;
  object-fit: cover;
}

.flag {
  font-size: 28px;
  line-height: 1;
  width: 36px;
  text-align: center;
}

.city-name {
  font-size: 16px;
  font-weight: 500;
  color: #000000;
}

.postal-code {
  font-size: 13px;
  color: #000000;
  margin-left: auto;
}

#ville {
  box-sizing: border-box;
}

#ville:focus {
  outline: none;
  border-color: #28a745;
}

.no-result {
  padding: 16px;
  color: #888;
  text-align: center;
  font-style: italic;
}

.loading {
  padding: 16px;
  color: #007bff;
  text-align: center;
  font-style: italic;
}

.error {
  padding: 16px;
  color: #dc3545;
  text-align: center;
}