/* ------------------------------------
   Messages (succès / erreur)
-------------------------------------*/
.message {
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}
.message.success {
  background-color: #e6ffed;
  border: 1px solid #34a853;
  color: #1e4620;
}
.message.error {
  background-color: #ffe6e6;
  border: 1px solid #d93025;
  color: #8a1f1f;
}

/* ------------------------------------
   Formulaire de contact
-------------------------------------*/
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Labels et legend */
.contact-form label,
.contact-form legend {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

/* Champs de saisie (text, email, textarea) */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  background-color: #fbfbfb;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 1rem;
  color: #333;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ------------------------------------
   Groupe de boutons radio « Destinataire »
-------------------------------------*/
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fbfbfb;
}
.radio-group legend {
  margin-bottom: 8px;
}

/* Chaque label contient input + span + texte */
.radio-group label {
  position: relative;
  padding-left: 30px;    /* espace pour le cercle LTR */
  font-size: 0.95rem;
  color: #333;
  cursor: pointer;
  user-select: none;
}

/* Masquer l’input radio natif */
.radio-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Cercle personnalisé */
.radio-group span.custom-radio {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 50%;
  background-color: #fff;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Cercle intérieur (invisible par défaut) */
.radio-group span.custom-radio::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Quand l’input est coché */
.radio-group input[type="radio"]:checked + span.custom-radio {
  background-color: #007bff;
  border-color: #007bff;
}
.radio-group input[type="radio"]:checked + span.custom-radio::after {
  opacity: 1;
  background-color: #fff;
}

/* ------------------------------------
   RTL : inverser l’ordre et position des cercles
-------------------------------------*/
[dir="rtl"] .radio-group label {
  padding-left: 0;
  padding-right: 30px;   /* espace pour le cercle RTL */
}
[dir="rtl"] .radio-group span.custom-radio {
  left: auto;
  right: 0;              /* placer le cercle à droite */
}
[dir="rtl"] .radio-group span.custom-radio::after {
  left: auto;
  right: 4px;            /* centrer le point intérieur dans le cercle RTL */
}

/* ------------------------------------
   Bouton d’envoi
-------------------------------------*/
.contact-form button[type="submit"] {
  font-family: 'Noto Kufi Arabic', sans-serif;
  align-self: center;
  background-color: #007bff;
  color: #fff;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.contact-form button[type="submit"]:hover {
  background-color: #0056b3;
}

/* ------------------------------------
   Police globale
-------------------------------------*/
body,
input,
textarea {
  font-family: Arial, sans-serif;
}

/* ------------------------------------
   Responsive (mobiles)
-------------------------------------*/
@media (max-width: 600px) {
  .main-content {
    padding: 20px;
    margin: 20px auto;
  }
  .main-content h1 {
    font-size: 1.6rem;
  }
  .contact-form {
    gap: 12px;
  }
  .radio-group {
    padding: 8px 10px;
  }
  .radio-group label {
    font-size: 0.9rem;
    padding-left: 26px;
  }
  .radio-group span.custom-radio {
    width: 16px;
    height: 16px;
  }
  .radio-group span.custom-radio::after {
    left: 3px;
    top: 3px;
    width: 6px;
    height: 6px;
  }
  .contact-form button[type="submit"] {
    padding: 8px 18px;
    font-size: 0.95rem;
  }
}
