/* ============================================= */
/* === STYLES PAGE CONTACT (Hébreu - RTL)    === */
/* === (Basé sur contact.css V4 Français)    === */
/* ============================================= */

/* ----- Dépendances ----- */
/* Ce fichier suppose que les variables CSS (:root), les styles de base (body, container),
   les styles de header/footer, et les styles de boutons GÉNÉRAUX (.btn)
   sont définis dans votre fichier CSS global (ex: style.css)
   ET que style.css définit les polices hébraïques pour --font-main et --font-heading. */

/* ----- Surcharge Style Global pour CETTE page ----- */

.page-banner {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../img/market1.jpg') center/cover no-repeat;
}

/* ----- Styles Uniques à la Page Contact ----- */

.contact-section {
  padding: 80px 0;
  background-color: #fff;
}

.internal-title {
  font-family: var(--font-heading, 'Heebo', 'Assistant', sans-serif); /* Priorité aux polices HE */
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 60px;
  text-align: center;
  position: relative;
  color: var(--dark-color, #333);
  padding-bottom: 15px;
}
.internal-title span {
  color: var(--primary-color, #c5281c);
}
.internal-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  /* RTL: left: 50% et transform: translateX(-50%) restent valables pour le centrage */
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 3px;
  background-color: var(--primary-color, #c5281c);
  border-radius: 1.5px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr; /* L'ordre des colonnes sera visuellement inversé en RTL si besoin, mais la structure reste */
  gap: 40px 60px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Colonne Infos Contact --- */
.contact-info {
  background-color: var(--light-color, #f8f9fa);
  border-radius: 10px;
  padding: 40px 35px;
  border: 1px solid var(--border-color, #dee2e6);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.info-title {
  font-family: var(--font-heading, 'Heebo', 'Assistant', sans-serif); /* Priorité aux polices HE */
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 40px;
  color: var(--dark-color, #333);
  position: relative;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--primary-600-rgb, 197, 40, 28), 0.15);
  /* RTL: text-align implicitement à droite via dir="rtl" sur body/html */
}

.info-item {
  display: flex;
  margin-bottom: 30px;
  align-items: center;
  gap: 20px;
  padding: 10px;
  border-radius: 6px;
  transition: background-color 0.25s ease-in-out;
  /* RTL: margin-left devient margin-right et vice-versa, mais ici symétrique (-10px de chaque côté) */
  margin-left: -10px; margin-right: -10px;
}
.info-item:hover {
  background-color: rgba(var(--primary-600-rgb, 197, 40, 28), 0.04);
}
.info-item:hover .info-icon {
  transform: scale(1.1);
  background-color: rgba(var(--primary-600-rgb, 197, 40, 28), 0.15);
}

.info-icon {
  width: 45px;
  height: 45px;
  background-color: rgba(var(--primary-600-rgb, 197, 40, 28), 0.08);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color, #c5281c);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.info-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--dark-color, #333);
  /* RTL: text-align implicitement à droite */
}
.info-content p {
  color: #555;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
  /* RTL: text-align implicitement à droite */
}
.info-content p a {
  color: var(--primary-color, #c5281c);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dotted rgba(var(--primary-600-rgb, 197, 40, 28), 0.5);
  transition: border-bottom 0.2s ease;
}
.info-content p a:hover {
  border-bottom-style: solid;
  border-bottom-color: var(--primary-color, #c5281c);
}
.timezone {
  font-size: 0.85em;
  color: #777;
  display: block;
  margin-top: 4px;
  /* RTL: text-align implicitement à droite */
}

.social-media {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid var(--border-color, #dee2e6);
}
.social-media h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--dark-color, #333);
  /* RTL: text-align implicitement à droite */
}
.social-icons {
  display: flex; /* L'ordre sera inversé en RTL si la source HTML les met dans un certain ordre */
  gap: 15px;
}
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background-color: rgba(var(--primary-600-rgb, 197, 40, 28), 0.08);
  color: var(--primary-color, #c5281c);
  border-radius: 50%;
  transition: all 0.3s ease;
  font-size: 1rem;
}
.social-icon:hover {
  background-color: var(--primary-color, #c5281c);
  color: #fff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 4px 10px rgba(var(--primary-600-rgb, 197, 40, 28), 0.3);
}

/* --- Styles pour la Colonne Formulaire --- */
.contact-form-container {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  padding: 40px 45px;
  border: 1px solid #f0f0f0;
}

.form-title {
  font-family: var(--font-heading, 'Heebo', 'Assistant', sans-serif); /* Priorité aux polices HE */
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 40px;
  color: var(--dark-color, #333);
  position: relative;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--primary-600-rgb, 197, 40, 28), 0.15);
  /* RTL: text-align implicitement à droite */
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* L'ordre des colonnes visuelles sera inversé en RTL */
  gap: 25px 25px;
}

.form-group {
  margin-bottom: 0; 
  position: relative;
}
.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
  /* RTL: text-align implicitement à droite */
}
.required {
  color: var(--primary-color, #c5281c);
  /* RTL: margin-left devient margin-right */
  margin-right: 3px; 
  margin-left: 0;
  font-weight: 600;
}

/* NOUVEAU/MODIFIÉ DANS CSS V4 Français : Spécifique pour les indicateurs dans les labels */
.required-indicator { 
    color: var(--primary-color, #c5281c);
    font-weight: 600;
    /* RTL: margin-left devient margin-right */
    margin-right: 2px; 
    margin-left: 0;
}
.optional-text, .optional { 
  font-size: 0.85em;
  color: #888;
  /* RTL: margin-left devient margin-right */
  margin-right: 5px; 
  margin-left: 0;
  font-weight: 400;
  font-style: italic;
}


.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: var(--font-main, 'Heebo', 'Assistant', sans-serif); /* Priorité aux polices HE */
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--dark-color, #333);
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  /* RTL: text-align implicitement à droite si le placeholder est aussi en RTL */
}
.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aaa;
  font-size: 0.9em;
  font-style: italic;
  /* RTL: S'assurer que le placeholder s'affiche bien à droite. Généralement automatique. */
}

.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
  border-color: var(--primary-color, #c5281c);
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-600-rgb, 197, 40, 28), 0.15);
  background-color: #fff;
}
.checkbox-group input:focus-visible {
  outline: 2px solid var(--primary-color, #c5281c);
  /* RTL: outline-offset peut être inversé si besoin, mais souvent ok */
  outline-offset: 1px; 
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* RTL: Inverser la position de la flèche */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23c5281c' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 5-6 6-6-6'/%3E%3C/svg%3E"); /* Flèche inversée */
  background-repeat: no-repeat;
  /* RTL: background-position right devient left */
  background-position: left 15px center; 
  background-size: 0.9em;
  /* RTL: padding-right devient padding-left */
  padding-left: 40px; 
  padding-right: 15px; /* Maintenir un padding à droite aussi */
  cursor: pointer;
}
.form-group select:required:invalid {
  color: #777;
}
.form-group select option[value=""][disabled] {
  color: #aaa;
  font-style: italic;
}
.form-group select option {
  color: var(--dark-color, #333);
  font-style: normal;
  /* RTL: text-align: right; si le navigateur ne le fait pas automatiquement pour les options */
  /* En général, les options de select s'alignent selon dir="rtl" de la page */
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 5px;
  /* RTL: flex-direction: row-reverse; si l'ordre visuel checkbox puis label est souhaité.
     Actuellement, c'est input puis label dans le HTML. L'ordre naturel de flex sera maintenu.
     Si on veut la checkbox à DROITE du label, il faudrait du CSS spécifique. */
}
.checkbox-group input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
  /* RTL: margin-top ok, mais si on voulait un margin-left, ça deviendrait margin-right */
  margin-top: 0.2em; 
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--primary-color, #c5281c);
  /* RTL: Pas de changement spécifique ici. L'input est avant le label dans le DOM. */
}
.checkbox-group label {
  font-size: 0.8rem;
  margin-bottom: 0;
  line-height: 1.5;
  font-weight: 400;
  color: #555;
  cursor: pointer;
  /* RTL: text-align implicitement à droite */
}
.checkbox-group label a {
  color: var(--primary-color, #c5281c);
  text-decoration: underline;
  font-weight: 500;
}
.checkbox-group label a:hover {
  text-decoration: none;
}

/* --- Styles pour les messages d'erreur --- */
.error-message {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary-color, #c5281c);
  margin-top: 5px;
  min-height: 1.1em; 
  /* RTL: padding-left devient padding-right */
  padding-right: 2px; 
  padding-left: 0;
  opacity: 0;
  max-height: 0; 
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease, margin-top 0.3s ease;
  /* RTL: text-align implicitement à droite */
}
.error-message.visible {
  opacity: 1;
  max-height: 3.5em; 
  margin-top: 5px;
}

/* Style des champs invalides */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: var(--primary-color, #c5281c) !important;
  background-color: rgba(var(--primary-600-rgb, 197, 40, 28), 0.02);
}
.form-group .checkbox-group input.error {
  outline: 1.5px solid var(--primary-color, #c5281c);
  outline-offset: 1px;
}
.form-group .checkbox-group input.error + label { 
  color: var(--primary-color, #c5281c);
  font-weight: 500;
}


/* NOUVEAU CSS V4 Français : Style pour le compteur de caractères sous le textarea */
.char-counter-display {
  font-size: 0.75rem;
  color: #777;
  margin-top: 5px;
  /* RTL: text-align: right devient text-align: left */
  text-align: left; 
  /* RTL: padding-right devient padding-left */
  padding-left: 5px; 
  padding-right: 0;
  min-height: 1em;
}
.char-counter-display.error { 
  color: var(--primary-color, #c5281c);
  font-weight: bold;
}


/* Conteneur du bouton de soumission */
.form-submit {
  grid-column: span 2;
  margin-top: 15px;
}

/* Bouton de soumission */
.form-submit button {
  width: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 14px 28px;
  min-height: 51px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  text-align: center;
  background-color: var(--primary-color, #c5281c);
  border-color: var(--primary-color, #c5281c);
  color: var(--white-color, #fff);
  transition: background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.form-submit button:not(:disabled):hover {
  background-color: var(--primary-500, #d84d3f);
  border-color: var(--primary-500, #d84d3f);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(var(--primary-600-rgb, 197, 40, 28), 0.2);
}
.form-submit button:disabled {
  background-color: var(--primary-500, #d84d3f); 
  border-color: var(--primary-500, #d84d3f);  
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-loader {
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--white-color, #fff);
  font-weight: 500;
  font-size: 0.95em;
}
.btn-loader.show {
  display: inline-flex;
}
.btn-loader i {
  /* RTL: margin-right devient margin-left */
  margin-left: 8px; 
  margin-right: 0;
  font-size: 1em;
}

.btn-text {
  display: inline-block;
  color: inherit;
}
.btn-text.hide {
  display: none;
}

/* Message global (succès ou erreur après soumission) */
#form-message {
  grid-column: span 2;
  border-radius: 6px;
  margin: 10px 0 0; 
  font-weight: 500;
  font-size: 0.9rem;
  /* RTL: border-left-width devient border-right-width */
  border-right-width: 5px; 
  border-left-width: 0;
  border-right-style: solid;
  border-left-style: none;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  transition: all 0.4s ease-out;
  /* RTL: text-align implicitement à droite */
}
#form-message.show {
  opacity: 1;
  max-height: 100px; 
  margin-top: 15px; 
  padding: 12px 18px;
}
#form-message.success {
  background-color: rgba(40, 167, 69, 0.1);
  /* RTL: border-left-color devient border-right-color */
  border-right-color: var(--secondary-color, #28a745); 
  border-left-color: transparent;
  color: #185e2a; 
}
#form-message.error {
  background-color: rgba(var(--primary-600-rgb, 197, 40, 28), 0.1);
  /* RTL: border-left-color devient border-right-color */
  border-right-color: var(--primary-color, #c5281c); 
  border-left-color: transparent;
  color: #a1261d; 
}


/* --- Styles pour la Section Carte --- */
.map-section {
  height: 450px;
  filter: grayscale(30%) contrast(90%);
  transition: filter 0.4s ease;
}
.map-section:hover {
  filter: grayscale(0%) contrast(100%);
}
.map-container {
  height: 100%;
  width: 100%;
}
.map-container iframe {
  height: 100%;
  width: 100%;
  display: block;
  border: none;
}


/* ============================================= */
/* ===          STYLES RESPONSIVES           === */
/* ============================================= */

/* --- Tablettes (ex: > 768px et <= 992px) --- */
@media (max-width: 992px) {
  .contact-grid {
      grid-template-columns: 1fr;
      gap: 50px;
  }
  .contact-info {
      height: auto; 
  }
  .info-title, .form-title {
      text-align: center;
      border-bottom: none; 
  }
  .info-title::after, .form-title::after { 
      content: '';
      position: absolute;
      bottom: 0;
      /* RTL: Centrage ok */
      left: 50%;
      transform: translateX(-50%);
      width: 50px;
      height: 3px;
      background-color: var(--primary-color, #c5281c);
      border-radius: 1.5px;
      display: block; 
  }
}

/* --- Petites Tablettes / Grands Mobiles (ex: > 576px et <= 768px) --- */
@media (max-width: 768px) {
  .internal-title {
      font-size: clamp(1.6rem, 4vw, 2rem);
      margin-bottom: 50px;
  }
  .contact-form {
      grid-template-columns: 1fr; 
  }
  .form-group.full-width {
      grid-column: 1; 
  }
  .contact-form-container, .contact-info {
      padding: 35px 30px;
  }
  .map-section {
      height: 350px;
  }
  .info-title, .form-title {
      font-size: 1.5rem;
  }
}

/* --- Petits Mobiles (ex: <= 576px) --- */
@media (max-width: 576px) {
  .contact-section { padding: 60px 0; }

  .info-item {
      flex-direction: column;
      align-items: flex-start; /* Devrait être align-items: start pour RTL, mais flex-start ici alignera à GAUCHE (début de la ligne).
                                   Pour aligner à DROITE (début de la ligne en RTL), ce serait bien flex-start ou juste align-items: stretch; text-align: right; */
      /* RTL: text-align: right; (par défaut via dir=rtl) */
      gap: 10px;
      margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; 
  }
  .info-item:hover { background-color: transparent; } 
  .info-icon { margin-bottom: 5px; width: 40px; height: 40px; font-size: 1rem; }
  .info-content h4 { font-size: 1rem; }
  .info-title, .form-title {
      font-size: 1.4rem;
      margin-bottom: 30px;
      /* RTL: text-align: right; */
      text-align: right; /* Explicite pour mobile si besoin */
      padding-bottom: 10px;
  }
   .info-title::after, .form-title::after { 
      /* RTL: left devient right pour alignement à droite */
      right: 0;
      left: auto; 
      transform: none;
      width: 40px;
   }

  .contact-form-container, .contact-info { padding: 30px 20px; }
  .contact-form { gap: 20px 0; } 

  .form-group input, .form-group select, .form-group textarea {
      font-size: 0.9rem;
      padding: 11px 13px; 
  }
  .form-group label { font-size: 0.85rem; }
  .checkbox-group label { font-size: 0.75rem; }
  .error-message { font-size: 0.75rem; }
  .char-counter-display { font-size: 0.7rem; } 

  .form-submit button { padding: 12px 20px; min-height: 48px; }
  .btn-loader { font-size: 0.9em; }
  .map-section { height: 300px; }

  .internal-title::after { display: none; } 
}

/* Classe utilitaire pour l'accessibilité */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; /* Ajouté pour être complet */
}